Page 1 of 1

How histou passes result to Grafana

PostPosted: Sun Jan 09, 2022 2:44 pm
by kupivar

Histou has no problem passing the results that are returned by built-in check command. However, it fails if the result is returned by custom scripts. For example, command that is triggered by check_by_ssh.
I use check_by_ssh to get the CPU usage of a remote Linux server. It returns a text or numeric value, which I'm not sure its format; it represents the percentage of usage. Command as below

Code: Select all
top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\([0-9.]*\)%* id.*/\1/' | awk '{print 100 - \$1}'

Histou unable to plot a panel graph for this.
What I've noticed is that those results that can be plotted have status "OK" in their results, such as "OK", "PING OK", "DISK OK", and so on. I've no idea whether it's the cause or not.

Re: How histou passes result to Grafana

PostPosted: Mon Jan 17, 2022 5:39 pm
by pbroste
Hello @kupivar

The option to put this Nagios plugin on the remote device or create your own CPU usage check plugin script.


Code: Select all
/usr/lib/nagios/plugins/check_by_ssh -H -C "/yourplugindir/ -C -w 90 -c 100 -s 5"