We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

How histou passes result to Grafana

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

How histou passes result to Grafana

Postby kupivar » Sun Jan 09, 2022 2:44 pm

Hello,

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.
kupivar
 
Posts: 1
Joined: Sun Jan 09, 2022 2:42 pm

Re: How histou passes result to Grafana

Postby pbroste » Mon Jan 17, 2022 5:39 pm

Hello @kupivar

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

Example:

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


Thanks,
Perry
User avatar
pbroste
 
Posts: 1281
Joined: Tue Jun 01, 2021 1:27 pm


Return to Community Support

Who is online

Users browsing this forum: Google [Bot], rajeevroy and 21 guests