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.
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:
interval
seconds. This technique should work for 99% of use cases, but when there are a limited number of ports open on the client load one can receive the error "Only one usage of each socket address (protocol/network address/port) is normally permitted". The new behavior will keep the same connection open until there is a failure, which will then trigger a reconnect.This release is backwards compatible. For those interested in Graphite tags -- they are not backwards compatible! While tagged metrics will have the same name as pre-tagged OhmGraphite metrics, Graphite will treat them separately. So one can either merge these metrics or start over.
Bugfix for users where their computer culture doesn't use a period .
as the decimal separator resulting in warnings and no data being stored.
Huge shout out to @jonasbleyl who discovered a whole swath of hardware metrics that can be reported!
DEBUG
to aid diagnosticsOhmGraphite.exe
. No need for the .dll files anymore. Upgrading now consists solely of replacing the executable.