The Sensu Go check plugin for collecting Sensu Enterprise (Classic) metrics.
Download the latest version of the sensu-enterprise-metrics from releases, or create an executable script from this source.
From the local path of the sensu-enterprise-metrics repository:
go build -o /usr/local/bin/sensu-enterprise-metrics main.go
Example Sensu Go check definition:
{
"api_version": "core/v2",
"type": "CheckConfig",
"metadata": {
"namespace": "default",
"name": "sensu-enterprise-metrics"
},
"spec": {
"command": "sensu-enterprise-metrics -user username -password secret -latest",
"subscriptions":[
"sensu-enterprise"
],
"publish": true,
"interval": 10,
"output_metric_format": "graphite_plaintext",
"output_metric_handlers": [
"influxdb"
]
}
}
Help:
$ sensu-enterprise-metrics -h
Usage of sensu-enterprise-metrics:
-ca-cert string
Path to CA certificate
-host string
Sensu Enterprise API host. (default "localhost")
-insecure-skip-verify
Don't verify TLS hostnames
-latest
Only return the latest point per Enterprise metric.
-password string
Sensu Enterprise API password.
-port int
Sensu Enterprise API port. (default 4567)
-scheme string
Sensu Enterprise URL scheme (http or https) (default "http")
-timeout int
Sensu Enterprise API request timeout (in seconds). (default 15)
-user string
Sensu Enterprise API user.
See https://github.com/sensu/sensu-go/blob/master/CONTRIBUTING.md