Again, noob but have a home lab im trying to learn on, using ubuntu and centos
I have been following the doc’s as best i can and pieced stuff together to try an accomplish collecting custom metrics that are flowing on the event bus and putting it into influx for reporting purposes but i am failing at this point, have posted some lines from syslog and my handler and check configuration bellow. is anyone aware of a complete walkthrough on how to do this? I’m pretty sure once i see what i have done wrong it will open up my eyes.
once i get checks sorted out i will start to play with some plugins, also want to do something with statd as well but just baby steps right now
(posted in yaml format, is json easier to read?)
i have also used the format graphite_plaintext and receive a similar area
Many thanks for any response
Andrew
Jul 29 11:39:52 zig sensu-agent[852]: {“asset”:“cpu-checks-plugins”,“component”:“asset-manager”,“entity”:“zig”,“level”:“info”,“msg”:“asset includes builds, using builds instead of asset”,“time”:“2020-07-29T11:39:52-04:00”}
Jul 29 11:39:52 zig sensu-agent[852]: {“asset”:“sensu-ruby-runtime”,“component”:“asset-manager”,“entity”:“zig”,“level”:“info”,“msg”:“asset includes builds, using builds instead of asset”,“time”:“2020-07-29T11:39:52-04:00”}
Jul 29 11:39:57 zig sensu-agent[852]: {“check”:“check-cpu”,“component”:“agent”,“error”:“unable to extract metric from check output”,“level”:“error”,“line”:0,“msg”:“influxdb line format requires 2 arguments with a 3rd (optional) timestamp”,“namespace”:“default”,“time”:“2020-07-29T11:39:57-04:00”}
skipper@backend:/var/log$ sensuctl handler list --format yaml
type: Handler
api_version: core/v2
metadata:
created_by: skipper
name: influx-db
namespace: default
spec:
command: sensu-influxdb-handler -d sensu
env_vars:
- INFLUXDB_ADDR=http://192.168.1.55:8086
- INFLUXDB_USER=sensu
- INFLUXDB_PASS=sensu
filters: null
handlers: null
runtime_assets: - influxdb-handler
secrets: null
timeout: 0
type: pipe
skipper@backend:/var/log$
skipper@backend:/var/log$ sensuctl check list --format yaml
type: CheckConfig
api_version: core/v2
metadata:
created_by: skipper
name: check-cpu
namespace: default
spec:
check_hooks: null
command: check-cpu.rb -w 75 -c 90
env_vars: null
handlers:
high_flap_threshold: 0
interval: 150
low_flap_threshold: 0
output_metric_format: influxdb_line
output_metric_handlers:
- influx-db
proxy_entity_name: “”
publish: true
round_robin: false
runtime_assets: - cpu-checks-plugins
- sensu-ruby-runtime
secrets: null
stdin: false
subdue: null
subscriptions: - Linux
timeout: 0
ttl: 0