diff --git a/CHANGELOG.md b/CHANGELOG.md index b34087b..60ea02d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,20 +2,18 @@ ### **Breaking changes** -* `systemd_unit_state` label `type` has new meaning - Now shows Unit type (`service`, `scope`, etc), not Service Unit types (`simple`, `forking`, etc) - or mount unit types(`aufs`,`ext3`, etc). Service and mount types have been moved to `systemd_unit_info` +* `systemd_unit_state` label `type` has new meaning. Previously `type` contained service unit type (`simple`, `forking`, etc) or mount unit types (`aufs`, `ext3`, etc). Now `systemd_unit_state{type}` contains overall unit type (`service`, `scope`, etc) to allow easy PromQL group by clauses. Service and mount types have been moved to `systemd_unit_info` ### Changes - [FEATURE] Read unit CPU usage from cgroup. Added `systemd_unit_cpu_seconds_total` metric. **Note** - Untested on unified hierarchy - [FEATURE] Add `systemd_unit_info` with metainformation about units incl. subtype specific info - [ENHANCEMENT] Added `type` label to all metrics named `systemd_unit-*` to support PromQL grouping -* [ENHANCEMENT] `systemd_unit_state` works for all unit types, not just service and mount units -* [ENHANCEMENT] Scrapes are approx 80% faster. If needed, set GOMAXPROCS to limit max concurrency -* [CHANGE] Start tracking metric cardinality in readme -* [CHANGE] Expanded default set of unit types monitored. Only device unit types are not enabled by default -* [BUGFIX] `timer_last_trigger_seconds` metric is now exported as expected for all timers +- [ENHANCEMENT] `systemd_unit_state` works for all unit types, not just service and mount units +- [ENHANCEMENT] Scrapes are approx 80% faster. If needed, set GOMAXPROCS to limit max concurrency +- [CHANGE] Start tracking metric cardinality in readme +- [CHANGE] Expanded default set of unit types monitored. Only device unit types are not enabled by default +- [BUGFIX] `timer_last_trigger_seconds` metric is now exported as expected for all timers ## 0.2.0 / 2019-03-20 diff --git a/README.md b/README.md index 9d52ad1..9fa8f76 100644 --- a/README.md +++ b/README.md @@ -79,15 +79,15 @@ Note that a number of unit types are filtered by default | ----------------------------------------- | ----------- | -------- | ------------------------------------------------------------------ | | systemd_exporter_build_info | Gauge | UNSTABLE | 1 per systemd-exporter | | systemd_unit_info | Gauge | UNSTABLE | 1 per service + 1 per mount | -| systemd_unit_cpu_seconds_total | Gauge | UNSTABLE | 2 per mount/scope/slice/socket/swap {mode="system/user"} | +| systemd_unit_cpu_seconds_total | Counter | UNSTABLE | 2 per mount/scope/slice/socket/swap {mode="system/user"} | | systemd_unit_state | Gauge | UNSTABLE | 5 per unit {state="activating/active/deactivating/failed/inactive} | | systemd_unit_tasks_current | Gauge | UNSTABLE | 1 per service | | systemd_unit_tasks_max | Gauge | UNSTABLE | 1 per service | | systemd_unit_start_time_seconds | Gauge | UNSTABLE | 1 per service | -| systemd_service_restart_total | Gauge | UNSTABLE | 1 per service | +| systemd_service_restart_total | Counter | UNSTABLE | 1 per service | | systemd_socket_accepted_connections_total | Counter | UNSTABLE | 1 per socket | | systemd_socket_current_connections | Gauge | UNSTABLE | 1 per socket | -| systemd_socket_refused_connections_total | Gauge | UNSTABLE | 1 per socket | +| systemd_socket_refused_connections_total | Counter | UNSTABLE | 1 per socket. Requires systemd>239 | | systemd_timer_last_trigger_seconds | Gauge | UNSTABLE | 1 per timer | | systemd_process_resident_memory_bytes | Gauge | UNSTABLE | 1 per service | | systemd_process_virtual_memory_bytes | Gauge | UNSTABLE | 1 per service | diff --git a/systemd/systemd.go b/systemd/systemd.go index 87af595..3ac1ff4 100644 --- a/systemd/systemd.go +++ b/systemd/systemd.go @@ -605,7 +605,7 @@ func (c *Collector) collectSocketConnMetrics(conn *dbus.Conn, ch chan<- promethe return errors.Wrapf(err, errGetPropertyMsg, "NRefused") } ch <- prometheus.MustNewConstMetric( - c.socketRefusedConnectionsDesc, prometheus.GaugeValue, + c.socketRefusedConnectionsDesc, prometheus.CounterValue, float64(refusedConnectionCount.Value.Value().(uint32)), unit.Name) return nil