OhmGraphite

Expose hardware sensor data to Graphite / InfluxDB / Prometheus / Postgres / Timescaledb

OTHER License

Stars
422

Bot releases are visible (Hide)

OhmGraphite - v0.18.0 - May 8th, 2021

Published by github-actions[bot] over 3 years ago

A purposely small release to test the new distribution. OhmGraphite is now
packaged as a single executable that does not depend on the system's .NET
framework. This should allow more users to access OhmGraphite, but I'm not sure
I've tracked all the downsides. One of the major downsides is that the
executable size has increased from 3MB to 30MB.

  • Bump LibreHardwareMonitor to latest
    • Intel Gen11 Rocket Lake Support
    • Enable reporting SoC voltage for Zen+ APUs
    • Fix AMD Overdrive5 detection
OhmGraphite - v0.17.0 - March 22nd, 2021

Published by nickbabcock over 3 years ago

  • Allow configuration file parameter when run interactively
  • Bump LibreHardwareMonitor to latest
    • Add support for ASRock X570 Phantom Gaming-ITX/TB3 (NCT6683D)
    • Add support for ASRock X570 Taichi
    • Add support for Asus X470-I Gaming
    • Add fan control for IT8728F
    • Add fan control to Z390 M Gaming IT8688E
    • Fix readings for Samsung 980 Pro SSD
  • Bump internal dependencies
OhmGraphite - v0.16.0 - November 29th, 2020

Published by nickbabcock almost 4 years ago

  • Allow omission of password in config file for passwordless influxdb user
  • Bump LibreHardwareMonitor to latest
    • Better support for Ryzen 5000
    • More accurate Ryzen 3000 CCD Temperatures
    • Add Processor Cache to SMBios
    • Fix possible exception when waking from standby
    • Added support for NCT6687D
    • Fix network exception when disabling IPv4
  • Update internal client dependencies (prometheus and postgres) to latest major versions.

Fix Graphite Connection Write Contention

If polling for sensors + writing to graphite takes longer than the
configured interval, then it is possible for two threads to be writing
data to the same graphite connection. This will cause corrupted data to
be sent to graphite. This has been fixed.

OhmGraphite - v0.15.0 - June 4th, 2020

Published by nickbabcock over 4 years ago

Two highlights from this release:

Hiding Sensors

There may be a sensor that is faulty on a given machine. Maybe it reports negative temperatures. This can throw off monitoring software or make it harder to maintain with all the special cases. OhmGraphite allows one to exclude a sensor from being exported by modifying the OhmGraphite config and adding the /hidden suffix to the sensor id like so:

<add key="/lpc/nct6792d/temperature/1/hidden" />

Sensor Library Update

LibreHardwareMonitor has received a significant amount of work in the past month. The most jarring change will probably be that several hardware types (Aquacomputer, AeroCool, Heatmaster, and TBalancer) have been consolidated into a single hardware type (Cooler). This is will be an inconvenience to users relying on those metric names.

Another inconvenience is that GPU sensor identifiers have also been updated, so depending on the dashboard, GPU graphs may need to be updated to reference this new identifier.

In the end, for my own personal dashboards which are derived from the sample ones listed in the readme, the only change I've noticed is that the CPU bus speed is reported alongside CPU frequencies.

OhmGraphite - v0.14.0 - April 26th, 2020

Published by nickbabcock over 4 years ago

A very minor release, but since the underlying sensor library has been updated in the meantime, the usual caveats regarding new / renamed metrics apply, though in this case most users shouldn't notice anything different. The most impactful change in these last few days is the bugfix in detection of NVMe drives. While some could be detected perfectly fine (like a HP EX920), others would only be detected as a generic hard drive (like the newer HP EX950). This release should now detect more NVMe drives than previously, and as a result more metrics will be available.

OhmGraphite - v0.13.0 - April 19th, 2020

Published by nickbabcock over 4 years ago

A few features in this update:

  • Allow exporting of aliased metric names
  • Expose some missing NVMe SMART attributes
  • Bump to LibreHardwareMonitor

Aliasing

Aliasing was introduced as it is possible that the sensor names exposed through OhmGraphite are not descriptive enough. For instance, "Fan #2" could have RPM exposed, but you know that a more descriptive name would be "CPU Fan". To have OhmGraphite export the sensor under the "CPU Fan" name, one will need to add the mapping from sensor id (+ /name suffix) to the desired name like so:

    <add key="/lpc/nct6792d/fan/1/name" value="CPU Fan" />

There are several ways to determine the sensor id of a metric:

  • Postgres / Timescale and Influxdb users can examine their data store for the sensor id
  • Perform the rename in LibreHardwareMonitor and copy and paste the line from LibreHardwareMonitor.config into OhmGraphite.exe.config.
  • Search the OhmGraphite.log for the sensor's name that you'd like to rename (in the example, I'd search for "Fan #2"):

LibreHardwareMonitor Update

The underlying sensor library has been updated, so as always there may be new
sensors, renames, and bugfixes.

Some updates:

  • Fix AMD Missing GPU Temperature
  • Add support for Intel Comet Lake
  • Improve IT8655E support

For my personal dashboard:

  • new sensor "Nvidia GPU Bus Load"
  • motherboard 3VCC voltage sensor was renamed to +3.3V

NVMe SMART attributes

NVMe drives expose SMART attributes but not all are transmitted. In this
update, OhmGraphite is now exposing the following additional NVMe SMART
sensors:

  • Error Info Log Entry Count
  • Media Errors
  • Power Cycles
  • Unsafe Shutdowns

This doesn't cover all NVMe SMART attributes, so if there is one missing feel
free to raise an issue.

OhmGraphite - v0.12.0 - February 22nd, 2020

Published by nickbabcock over 4 years ago

This is a smaller update to the sensor library: LibreHardwareMonitor, but this
is still being denoted in OhmGraphite as a minor version bump to communicate
that metric values may have changed. Here are the changes to the sensor
library.

  • Add AMD Zen 2 CCD temperatures
  • Fix possible exceptions when waking from sleep
  • Capture fan rpm sensors on motherboards even if they are at 0 rpm
  • Support for 7th fan for NCT6797 and NCT6798
  • Support for Asrock X570 Pro4 (NCT6796D-R)
  • Support for X570 AORUS MASTER
  • The "Standby +3.3V" voltage sensor has been renamed "3VSB"
  • Fix swapped sensor readings for Nvidia GPUs in SLI

This had the following effects on a personal dashboard (AMD 2700, gtx 1070, m.2, asrock itx):

  • Even though I only have a single fan connected to the mobo (cpu fan), I now see 5 more fans (all set to 0 rpm), so with more exposed sensors, there will be more disk space usage (usually this is a non-issue, but having "useless" sensors take up disk space can be disconcerting)
  • Nonsensical temperatures are no longer reported for my mobo (I had one being reported at -50 degrees)
  • Even though I have a Zen 1 cpu, Core (Tdie) and Core (Tctl) were still combined under Core (Tctl/Tdie)

The only other change for this release is a internal dependency bump to the Postgres / TimecaleDB driver that ensures better stability.

You may have missed it, but there are now starter dashboards for visualizing OhmGraphite data.

These are designed to jump start your own dashboard!

OhmGraphite - v0.11.0 - January 6th, 2020

Published by nickbabcock almost 5 years ago

Big update to the underlying LibreHardwareMonitor library, I've tried to
ensure that backwards compatibility is maintained in respect to the
metric names that are generated; however, there some breakages may slip
through. For instance, I believe that the CPU DRAM power sensor for
intel chips have been relabed to "CPU Memory", so one should double
check and adjust their dashboards as needed.

Other changes to LibreHardwareMonitor:

  • Add SoC voltage for Ryzen 2
  • Add support for AMD / ATI rx5700 GPUs
  • Fix Ryzen temperature offsets
  • Add motherboard: B350 Gaming Plus
  • Add motherboard: X470 AORUS GAMING 7 WIFI-CF
  • Add motherboard: ITE IT8792E
  • Add liquid + plx temperatures and power usage for AMD / ATI GPUs.
  • Bugfix for Asrock Pro / Steel Legend B450 motherboards
  • Add detection for additional Intel architectures:
    • Goldmont
    • Goldmont Plus
    • Cannon Lake
    • Ice Lake
    • Tiger Lake
    • Tremont
  • Add basic support for Aquacomputer's MPS (USB high flow)
  • Discard out of range temperatures for NVMe drives (-1000, 1000)
OhmGraphite - v0.10.0 - September 14th, 2019

Published by nickbabcock about 5 years ago

  • Breaking Change for Prometheus:
    • Sub categorize percent metrics to prevent overriding values. For instance, ohm_gpunvidia_percent has been split into ohm_gpunvidia_control_percent and ohm_gpunvidia_load_percent.
    • Include a "hw_instance" (hardware_instance) label to prometheus metrics. In a multi cpu, gpu, hdd system where the name of the hardware would be the same (ie: two graphics cards of "NVIDIA GeForce GTX 1070"), the metric values would clobber each other. The fix is to transmit the hardware's identifier as a metric label. These identifiers will often be an number representing the index of hardware (eg: "0" and "1"). Nics will use their guid's. I'm hoping future improvements could transmit the hard disk's mount point (eg: "C:", "D:"), as indices can non-intuitive. Other metric reporters should not be susceptible to this issue as the sensor's identifier is transmitted as well, so no breaking change for them now, but if the hardware identifier notion proves fruitful then these changes will be ported to the other metric reporters.
  • Allow one to assign a static hostname instead of DNS name or NetBIOS lookup. This is accomplished by setting an arbitrary value to name_lookup in the config (eg: <add key="name_lookup" value="my-cool-machine" />)
  • Update LibreHardwareMonitor to 63dcfe9:
    • Much improved list of supported NVMe drives!
    • Support for cores / threads greater than 254
    • Update for Ryzen 3000
    • Add support for MSI B450-A Pro
    • Add missing ATI GPU temperatures
  • Internal dependency bump:
    • Bump NLog.Config from 4.6.5 to 4.6.7
    • Bump Npgsql from 4.0.7 to 4.0.10
OhmGraphite - v0.9.1 - July 10th, 2019

Published by nickbabcock over 5 years ago

  • Update LibreHardwareMonitor to 14021762:
    • More CPU, Mainboard, and GPU sensors
  • Internal dependency update (no behavior changes should be expected):
    • Bump TopShelf from 4.2.0 to 4.2.1
    • Bump prometheus-net from 3.1.3 to 3.1.4
OhmGraphite - v0.9.0 - June 9th, 2019

Published by nickbabcock over 5 years ago

  • Breaking Change for Prometheus: OhmGraphite has not been following Prometheus best practices when it came to naming metrics. Metric names now look like "ohm_cpu_celsius" with only the "hardware" and "sensor" labels remaining. The following changes have been implemented:
    • app metric label has been removed in favor of a metric namespace prefix of "ohm"
    • hardware_type metric label has been removed in favor of encapsulating it into the metric name (eg: "cpu", "nic").
    • sensor_index metric label has been removed. This label proved superfluous as every sensor can be uniquely identified by it's name.
    • host metric label has been removed: This falls in line with other prometheus exporters like node_exporter, which does not export the host as a label.
    • base unit included in metric name: (like "bytes", "revolutions per minute", etc)
    • The value that is exported to Prometheus is now converted into base units, such as converting GB (2^30) and MB (2^20) into bytes, MHz into hertz. Other units are unaffected. There are two candidates for this conversion that were unaffected:
      • Flow rate is still liters per hour, even though liters per second may seem more "base-unity", but grafana contained the former but not the latter.
      • Fan speed remains revolutions per minute, as I'm unaware of any manufacturer reporting fan speed as revolutions per second.
    • Side note: OhmGraphite now follows the official data model naming scheme by replacing invalid characters with an underscore.
  • Only allow non-NaN and finite sensor values to be reported. Previously, NaN and infinite values could be reported which may cause downstream issues. For instance, Postgres / Prometheus will accept NaN values but Grafana will error out with a body json marshal error. These unexpected values should be quite rare, as out of the 25 million data points over the past week, 14 of those over 2 seconds were reported as NaN. It only takes a single NaN value to ruin a dashboard, so it's been fixed, and if a NaN value were to occur again, the sensor id would be logged under DEBUG before being discarded.
  • Update LibreHardwareMonitor to 713fd30
    • Fix: Nvidia power usage monitor via NVML (you'll need to install Nvidia's CUDA toolkit)
  • Internal dependency update (no behavior changes should be expected):
    • Bump prometheus-net from 3.1.0 to 3.1.3
    • Bump Npgsql from 4.0.5 to 4.0.7
    • Bump NLog.Config from 4.6.2 to 4.6.4
OhmGraphite - v0.8.3 - April 8th, 2019

Published by nickbabcock over 5 years ago

  • Allow one to switch from sending NetBIOS machine name to sending internet host name to metric sink.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="name_lookup" value="dns" />
  </appSettings>
</configuration>

(If you opt into this configuration, expect metric names / paths to change (eg: if the metric host was previously TINI, it may change to Tini) (ref: https://github.com/nickbabcock/OhmGraphite/issues/53))

  • Improve postgres connection attempts in edge cases
  • Update internal dependencies:
    • Bump prometheus-net from 3.0.3 to 3.1.0 (no apparent changes for OhmGraphite)
    • Bump Npgsql from 4.0.4 to 4.0.5 (fixes bugs)
    • Bump NLog.Config from 4.5.11 to 4.6.2 (more logging configurations for those who want it)
OhmGraphite - v0.8.2 - February 25th, 2019

Published by nickbabcock over 5 years ago

Bugfix release for our Prometheus users

  • Sanitize additional metric names for Prometheus (#43)
  • Bump prometheus-net from 3.0.1 to 3.0.3 for bugfixes
OhmGraphite - v0.8.1 - February 7th, 2019

Published by nickbabcock over 5 years ago

  • Fix: graphite: remove NIC guids in squirrelly parentheses
  • Fix: graphite: when graphite tag functionality is enabled, format number with culture invariant
  • Internal dependency update:
    • Bump prometheus-net from 2.1.3 to 3.0.1
OhmGraphite - v0.8.0 - January 30th, 2019

Published by nickbabcock over 5 years ago

  • Update LibreHardwareMonitor to 98969e
    • Add: Network (NIC) sensors (data downloaded, etc)
    • Add: AsRock B85M-DGS support for Voltage sensors
    • Add: Asus ROG Maximus Apex Mobo support
    • Add: Intel SSD Airflow temperature support
    • Add: Nuvoton NCT6798D support
    • Add: Z390 mobos and IT8688E chip support
    • Add: Nvidia power usage monitor via NVML (you'll need to install Nvidia's CUDA toolkit)
  • Internal dependency update:
    • Bump TopShelf from 4.1.0 to 4.2.0
OhmGraphite - v0.7.2 - December 31st, 2018

Published by nickbabcock almost 6 years ago

  • Bugfix for postgres / timescaledb users. This release eschews the asynchronous npgsql APIs in favor of the synchronous ones due to reliability issues.
  • Update Npgsql from 4.0.3 to 4.0.4
OhmGraphite - v0.7.1 - November 29th, 2018

Published by nickbabcock almost 6 years ago

Bugfix for the postgres / timescaledb users who have experienced the rare bug of "26000: prepared statement "_p1" does not exist" during database operations. It is unknown whether this is a bug in the C# postgres driver or intended behavior. Regardless, OhmGraphite would enter an infinite loop trying to insert sensor data. The fix is to now on db failure, in addition to re-instantiating a connection, to purge all persisted prepared statements.

OhmGraphite - v0.7.0 - October 17th, 2018

Published by nickbabcock about 6 years ago

This is strictly a breaking change for TimescaleDB users (nothing else has changed). Previously OhmGraphite would create a schema and initialize the Timescale table. While convenient, creating tables, indices, etc automatically is not desirable for an application that could be installed on many client machines. In production, one may want to create indices on other columns, omit an index on the host column, or create custom constraints. OhmGraphite shouldn't dictate everything. In fact, OhmGraphite should be able to function with a minimal amount of permissions. That is why with the 0.7 release, automatic creation of tables, etc is opt-in via the new timescale_setup option.

Recommendation: create a user that can only insert into the ohm_stats table

CREATE USER ohm WITH PASSWORD 'xxx';
GRANT INSERT ON ohm_stats TO ohm;

Then initialize the ohm_stats appropriately.

If one desires OhmGraphite to automatically setup the table structure then update the configuration to include timescale_setup

  <add key="timescale_setup" value="true" />

A side benefit of this update is that OhmGraphite can now insert into traditional PostgreSQL databases.

OhmGraphite - v0.6.0 - October 7th, 2018

Published by nickbabcock about 6 years ago

The big news for this release is TimescaleDB support, so OhmGraphite can now writes to a PostgreSQL database!

One can configure OhmGraphite to send to Timescale with the following (configuration values will differ depending on your environment):

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="type" value="timescale" />
    <add key="timescale_connection" value="Host=vm-ubuntu;Username=postgres;Password=123456;Database=postgres" />
  </appSettings>
</configuration>

OhmGraphite will create the following schema, so make sure the user connecting has appropriate permissions

CREATE TABLE IF NOT EXISTS ohm_stats (
   time TIMESTAMPTZ NOT NULL,
   host TEXT,
   hardware TEXT,
   hardware_type TEXT,
   identifier TEXT,
   sensor TEXT,
   sensor_type TEXT,
   sensor_index INT,
   value REAL
);

SELECT create_hypertable('ohm_stats', 'time', if_not_exists => TRUE);
CREATE INDEX IF NOT EXISTS idx_ohm_host ON ohm_stats (host);
CREATE INDEX IF NOT EXISTS idx_ohm_identifier ON ohm_stats (identifier);

Currenlty the schema and the columns are not configurable.

All patch notes:

  • Add TimescaleDB support
  • Update inner dependencies:
    • Update Topshelf from 4.0.4 to 4.1.0
    • Update pometheus-net from 2.1.0 to 2.1.3
  • Switch packing executable from ILRepack to Costura, as ILRepack is unable to pack in Npgsql without type exceptions at runtime.
OhmGraphite - v0.5.0 - July 26th 2018

Published by nickbabcock about 6 years ago

  • Add Prometheus support
    • OhmGraphite now requires .NET v4.6.1 (up from .NET v4.6). Most users should be unaffected by this change.
  • More metrics! OhmGraphite now takes advantage of metrics that the underlying hardware library detects at runtime.
Badges
Extracted from project README
CI dashboard