rrd files missing
rrd files missing
We we add a new device to Nagios. the rrd file is coming up missing /var/lib/mrtg/device.rrd is missing. I can add it manually and then give it the correct permissions and ownership and then the message goes away. Also those files are gathering data - they don't show data in CLI and aren't showing data in the GUI graph. Can you help me understand why these aren't being created when we add a new device? and then why they don't pull data.
Re: rrd files missing
Hello @acentek
Thanks for reaching out and would like to start off by taking a look at your Nagios XI System Profile so we can see what is going on. Please reference which '/var/lib/mrtg/device'.
To send us your system profile.
Perry
Thanks for reaching out and would like to start off by taking a look at your Nagios XI System Profile so we can see what is going on. Please reference which '/var/lib/mrtg/device'.
To send us your system profile.
- Login to the Nagios XI GUI using a web browser.
- Click the "Admin" > "System Profile" Menu
- Click the "Download Profile" button
- Save the profile.zip file send via Private Message
Perry
Re: rrd files missing
System Profile sent with info on a device.
Thank you.
Thank you.
Re: rrd files missing
Hello @acentek
Thanks for pinging me and sending over the System Profile. Want to make some adjustments based on what we see.
Edit this file:
Change this specific part (around line 46):
Add this:
So it looks like this:
Then edit this file:
Set:
Then restart apache/php-fpm:
Because you're getting things like:
Increase the following values in these files:
/usr/local/nagios/etc/pnp/process_perfdata.cfg:
TIMEOUT = 15
/usr/local/nagios/etc/pnp/npcd.cfg:
sleep_time = 10
Try a timeout of 30 and a sleep time of 15 and see if that improves things.
Then do:
In looking over MRTG, want to find out if cron is functioning, every 5 minutes will run the following: /etc/cron.d/mrtg:*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios
verify crond:
status:
Please zip up the '/tmp/mrtg.txt' and send that over when you get a chance.
Thanks,
Perry
Thanks for pinging me and sending over the System Profile. Want to make some adjustments based on what we see.
Edit this file:
Code: Select all
/etc/httpd/conf.d/php.conf
Code: Select all
<IfModule !mod_php5.c>
<IfModule !mod_php7.c>
# Enable http authorization headers
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
<FilesMatch \.(php|phar)$>
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
</FilesMatch>
</IfModule>
</IfModule>
Code: Select all
Timeout 600
RequestReadTimeout header=600,minrate=50
RequestReadTimeout body=600,minrate=50
<Proxy "unix:/run/php-fpm/www.sock|fcgi://localhost">
ProxySet timeout=600
</Proxy>
Code: Select all
<IfModule !mod_php5.c>
<IfModule !mod_php7.c>
# Enable http authorization headers
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
Timeout 600
RequestReadTimeout header=600,minrate=50
RequestReadTimeout body=600,minrate=50
<Proxy "unix:/run/php-fpm/www.sock|fcgi://localhost">
ProxySet timeout=600
</Proxy>
<FilesMatch \.(php|phar)$>
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
</FilesMatch>
</IfModule>
</IfModule>
Code: Select all
/etc/php-fpm.d/www.conf
Code: Select all
pm.max_requests = 50
Code: Select all
systemctl restart httpd php-fpm
in your /usr/local/nagios/var/npcd.log...NPCD: WARN: MAX load reached: load 12.800000
Increase the following values in these files:
/usr/local/nagios/etc/pnp/process_perfdata.cfg:
TIMEOUT = 15
/usr/local/nagios/etc/pnp/npcd.cfg:
sleep_time = 10
Try a timeout of 30 and a sleep time of 15 and see if that improves things.
Then do:
Code: Select all
systemctl restart npcd
In looking over MRTG, want to find out if cron is functioning, every 5 minutes will run the following: /etc/cron.d/mrtg:*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios
verify crond:
Code: Select all
systemctl status crond
Code: Select all
journalctl status crond
Code: Select all
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base,log &> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg &>> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios &>> /tmp/mrtg.txt
{ time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg 2>1 ; } 2>> /tmp/mrtg.txt
Thanks,
Perry
Re: rrd files missing
I ran through your suggestions without issue. I have sent a PM with the mrtg.zip as requested.
Thanks
Thanks
Re: rrd files missing
Hello @acentek
Thanks for following up, want to take a look at the Web console for a service check with performance data and get a screenshot.
Thanks,
Perry
Thanks for following up, want to take a look at the Web console for a service check with performance data and get a screenshot.
- Home => Service Status => Some Service with Perfdata [list]
- Performance Tab
Thanks,
Perry
You do not have the required permissions to view the files attached to this post.
Re: rrd files missing
Here is a screenshot of a service status - performance graph
You do not have the required permissions to view the files attached to this post.
Re: rrd files missing
With that we should see Performance Data in Service Status => Select snmp service check => Advanced Tab:
Do you see the Performance Data list in the box?
Here we see that it is plotting:
Let me know what you see,
Perry
Do you see the Performance Data list in the box?
Here we see that it is plotting:
Let me know what you see,
Perry
You do not have the required permissions to view the files attached to this post.
Re: rrd files missing
I'm seeing nothing being logged in the GUI. Also I have attached a screenshot from the /var/lib/mrtg directory of the rrd files that should match that host and there is no data there either.
The only hunch I have at this point is the rrd files are being created with the IP address in the file name instead of the hostname of the device? Should that naming match? And if so how would I match it because those rrd files automatically come up in Nagios upon device creation. The original problem is that those rrd files are not being automatically created, i have been have to create them manually based on the error message that comes up in the Nagios GUI.
The only hunch I have at this point is the rrd files are being created with the IP address in the file name instead of the hostname of the device? Should that naming match? And if so how would I match it because those rrd files automatically come up in Nagios upon device creation. The original problem is that those rrd files are not being automatically created, i have been have to create them manually based on the error message that comes up in the Nagios GUI.
You do not have the required permissions to view the files attached to this post.