Page 1 of 2
rrd files missing
Posted: Thu Feb 03, 2022 10:38 am
by acentek
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
Posted: Thu Feb 03, 2022 5:38 pm
by pbroste
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.
- 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
Thanks,
Perry
Re: rrd files missing
Posted: Thu Feb 03, 2022 5:46 pm
by acentek
System Profile sent with info on a device.
Thank you.
Re: rrd files missing
Posted: Fri Feb 04, 2022 3:57 pm
by pbroste
Hello
@acentek
Follow up, send PM with further instructions,
Perry
Re: rrd files missing
Posted: Thu Feb 17, 2022 4:11 pm
by pbroste
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):
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>
Add this:
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>
So it looks like this:
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>
Then edit this file:
Set:
Then restart apache/php-fpm:
Because you're getting things like:
NPCD: WARN: MAX load reached: load 12.800000
in your /usr/local/nagios/var/npcd.log...
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:
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
Please zip up the '/tmp/mrtg.txt' and send that over when you get a chance.
Thanks,
Perry
Re: rrd files missing
Posted: Fri Feb 18, 2022 8:50 am
by acentek
I ran through your suggestions without issue. I have sent a PM with the mrtg.zip as requested.
Thanks
Re: rrd files missing
Posted: Mon Feb 21, 2022 5:38 pm
by pbroste
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.
- Home => Service Status => Some Service with Perfdata
[list]- Performance Tab
perfdatagui.png
[/list]
Thanks,
Perry
Re: rrd files missing
Posted: Tue Feb 22, 2022 9:23 am
by acentek
Here is a screenshot of a service status - performance graph
Re: rrd files missing
Posted: Tue Feb 22, 2022 8:59 pm
by pbroste
With that we should see Performance Data in Service Status => Select snmp service check => Advanced Tab:
snmp_service_check.png
Do you see the Performance Data list in the box?
Here we see that it is plotting:
snmp_graph.png
Let me know what you see,
Perry
Re: rrd files missing
Posted: Wed Feb 23, 2022 9:36 am
by acentek
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.