Page 1 of 1

Performance graph of temperature service check

Posted: Mon Jan 15, 2018 2:41 pm
by absarcompass
Hi Guys,
I am having an issue here with performance graph. We are monitoring a sensor probe, running service checks on Battery, UPS, AirCon etc all the services are plotting performance graph including humidity check but Temperature check is not plotting graph.
Plugin used for monitoring is check_snmp OID based with version 1

/usr/local/nagios/libexec/check_snmp -H x.x.x.x -o 1.3.6.1.4.1.3854.1.2.2.1.17.1.3.0 -C ****** -P 1 -l "Humidity" -u "%" -w :70,:25 -c :80,:20
SNMP OK - Humidity 42 % | Humidity=42%;70;80;
This is plotting graph

But this is not

/usr/local/nagios/libexec/check_snmp -H x.x.x.x -o 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0 -C -P 1 -l "Temperature" -u "Deg. Celsius" -w :27,:15 -c :30,:12
SNMP OK - Temperature 22 Deg. Celsius | Temperature=22Deg. Celsius;27;30;


I have compared the service setting on services but can not pin point any difference, what could be an issue here ??
Any help would be appreciated.

Cheers.

Re: Performance graph of temperature service check

Posted: Mon Jan 15, 2018 4:40 pm
by npolovenko
Hello, @absarcompass. I don't think Deg. Celsius is a supported unit of measurement for Nagios performance graphs.

Code: Select all

UOM (unit of measurement) is one of:
no unit specified - assume a number (int or float) of things (eg, users, processes, load averages)
s - seconds (also us, ms)
% - percentage
B - bytes (also KB, MB, TB)
c - a continous counter (such as bytes transmitted on an interface)

Re: Performance graph of temperature service check

Posted: Tue Jan 16, 2018 2:37 pm
by absarcompass
Hi,
is there anything we can do to plot temperature graphs? any work around?

Re: Performance graph of temperature service check

Posted: Tue Jan 16, 2018 4:53 pm
by npolovenko
@absarcompass, There could be a way around. Your output needs to look like this:

Code: Select all

SNMP OK - Temperature 22 Deg. Celsius | Celsius=22Deg;27;30;
So I guess your command needs to look like this:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H x.x.x.x -o 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0 -C -P 1 -l "Celsius" -u "Deg" -w :27,:15 -c :30,:12
After you modify the command you need to delete the old RRD and XML files that belong to the host from /usr/local/nagios/share/perfdata/. That will make Nagios recreate a new RRD. After that let Nagios run for 15 minutes to let it insert some new data into the RRD.

Let us know if that worked for you.

Re: Performance graph of temperature service check

Posted: Tue Jan 16, 2018 5:05 pm
by absarcompass
Thanks for the way round.
Just to confirm, deleting xml and rrd file won't affect the other working performance graph of services on this host?
or all the previous data will be lost for other services on this host which are plotting fine ?

Re: Performance graph of temperature service check

Posted: Tue Jan 16, 2018 5:11 pm
by absarcompass
And the command is giving following output

/usr/local/nagios/libexec/check_snmp -H x.x.x.x -o 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0 -C **** -P 1 -l "Celsius" -u "Deg" -w :27,:15 -c :30,:12
SNMP OK - Celsius 20 Deg | Celsius=20Deg;27;30;

Re: Performance graph of temperature service check

Posted: Tue Jan 16, 2018 5:15 pm
by npolovenko
@absarcompass, The command output looks great. Yes, If the other graphs from this host are important don't delete the whole folder, delete only RRD and XML file that has the same name as the service check. Maybe also backup your XI before doing this.