pnp4nagios not generating rrd graphic for disk service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sgrili
Posts: 5
Joined: Mon Sep 24, 2018 4:12 am

pnp4nagios not generating rrd graphic for disk service

Post by sgrili »

Hi,

I need some help here to understand where the issue is. I installed the pnp4nagios in nagios CentOS7 using below link.
https://support.nagios.com/kb/article/n ... s-801.html

However, all other services like CPU, Uptime, SSH, etc have the graphics instead of disk service, though the service check is fine. When I checked the perfdata directory, I do not see rrd and xml files for disk service and not sure how to generate them. Thanks.

Code: Select all

nagios-2 pgsz-mysql-3]# pwd
/usr/local/pnp4nagios/var/perfdata/pgsz-mysql-3

nagios-2 pgsz-mysql-3]# ll
total 4552
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:41 CPU_load.rrd
-rw-rw-r--. 1 nagios nagios   1974 Apr  9 13:41 CPU_load.xml
-rw-rw-r--. 1 nagios nagios 768224 Apr  9 13:43 _HOST_.rrd
-rw-rw-r--. 1 nagios nagios   2576 Apr  9 13:43 _HOST_.xml
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:46 Memory_Usage.rrd
-rw-rw-r--. 1 nagios nagios   2047 Apr  9 13:46 Memory_Usage.xml
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:42 MySQL_Processlist.rrd
-rw-rw-r--. 1 nagios nagios   2069 Apr  9 13:42 MySQL_Processlist.xml
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:43 MySQL_Replication_Delay.rrd
-rw-rw-r--. 1 nagios nagios   2155 Apr  9 13:43 MySQL_Replication_Delay.xml
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:47 MySQL_Running_Threads_vs_Max_Connection_Ratio.rrd
-rw-rw-r--. 1 nagios nagios   2367 Apr  9 13:47 MySQL_Running_Threads_vs_Max_Connection_Ratio.xml
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:44 MySQL_Uptime.rrd
-rw-rw-r--. 1 nagios nagios   2055 Apr  9 13:44 MySQL_Uptime.xml
-rw-rw-r--. 1 nagios nagios 768224 Apr  9 13:43 PING.rrd
-rw-rw-r--. 1 nagios nagios   2676 Apr  9 13:43 PING.xml
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:43 ssh.rrd
-rw-rw-r--. 1 nagios nagios   1956 Apr  9 13:43 ssh.xml
-rw-rw-r--. 1 nagios nagios 384952 Apr  9 13:37 Uptime.rrd
-rw-rw-r--. 1 nagios nagios   2075 Apr  9 13:37 Uptime.xml

Code: Select all

define service{
        use                     generic-service,service-pnp
        hostgroup_name          linux
        service_description     Root Disk Usage
        servicegroups           disk
        check_command           check_snmp_disk!3!/
        contact_groups          admins
        }
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: pnp4nagios not generating rrd graphic for disk service

Post by tgriep »

Can you verify that the service check that is using the check_snmp_disk plugin is returning performance data?
Take a look at the service details in the Web interface.
Another thing to check. The check_snmp_disk plugin has to have the performance data enabled on it's output.
If you edit the command and add a -d to it, that will enable the performance data.

The PNP4Nagios logfile by default is in this location. Take a look at it if needed.

Code: Select all

/usr/local/pnp4nagios/var/perfdata.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
sgrili
Posts: 5
Joined: Mon Sep 24, 2018 4:12 am

Re: pnp4nagios not generating rrd graphic for disk service

Post by sgrili »

Thanks for the quick reply. Yes, the snmp_check_disk return me good service results, please see the screenshot attached. However it did not give me graph even though I have added -d option at the end of the command in host config file.

define service{
use generic-service,service-pnp
hostgroup_name linux
service_description Root Disk Usage
servicegroups disk
check_command check_snmp_disk!3! -d /
contact_groups admins
}

And the log did not tell much especially the data was 3 days back.
pgsz-nagios-2 ~]# tail /usr/local/pnp4nagios/var/perfdata.log
2019-04-06 09:03:15 [16893] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_errors.rrd 1554541379:0
2019-04-06 09:03:15 [16893] [0] RRDs::update ERROR /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_errors.rrd: illegal attempt to update using time 1554541379 when last update time is 1554541380 (minimum one second step)
2019-04-06 09:03:15 [16893] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_invalid.rrd 1554541379:0
2019-04-06 09:03:15 [16893] [0] RRDs::update ERROR /usr/local/pnp4nagios/var/perfdata/.pnp-internal/runtime_invalid.rrd: illegal attempt to update using time 1554541379 when last update time is 1554541380 (minimum one second step)
Attachments
pnp4nagios.png
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: pnp4nagios not generating rrd graphic for disk service

Post by tgriep »

If you click on the Graph icon for the Root Disk Usage check, do you see the graph for the disk data?

The screen shot that you provided, did not show the performance data, go back there and click on the Root Disk Usage check and that should show you the details for that check as well as the performance data.
Attached is an example of that menu and the performance data is highlighted in yellow.
Core-Perfdata.PNG
The -d option, you may want to edit the check_snmp_disk command in the commands.cfg file so that if you use that command on other hosts, it will be enabled for them and you will not have to edit all of the checks for the hosts to get performance data.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sgrili
Posts: 5
Joined: Mon Sep 24, 2018 4:12 am

Re: pnp4nagios not generating rrd graphic for disk service

Post by sgrili »

Hi, the check_snmp_disk return disk check information actually, please refer to another screenshot attached here. However, if I put -d in the command line, the service check would become unknown.

Code: Select all

This gave me unknown result
# 'check_snmp_disk' command definition
define command{
        command_name    check_snmp_disk
        command_line    $USER1$/check_snmp_disk -d $ARG1$ abcdbeef $HOSTADDRESS$ $ARG2$ 70 90
        }

Code: Select all

This did not give me error but no rrd generated neither
# 'check_snmp_disk' command definition
define command{
        command_name    check_snmp_disk
        command_line    $USER1$/check_snmp_disk $ARG1$ abcdbeef $HOSTADDRESS$ $ARG2$ 70 90 -d 
        }
So I guess the plugin I used does not support pnp4nagios graph? Do you have another disk plugin that use snmp and can generate rrd for the disk usage? Thanks.
Attachments
root disk.png
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: pnp4nagios not generating rrd graphic for disk service

Post by tgriep »

What you are looking for is a plugin that outputs performance data which, the pnp4nagios process will use to generate the graphs.
This plugin has a -f option that is used to output performance data. Give it a try.
https://exchange.nagios.org/directory/P ... ge/details
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked