rrd files missing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: rrd files missing

Post by pbroste »

Hello @acentek

Thanks for following up with the screenshots. Noticed that this is a Rock Linux Distro release 8.5 and wanted to find out if the graph perfdata functioned? Wondering if this is an issue was with an update that was pushed out. Whatever the case is, which could be pretty complex and comprehensive as Nagios is not officially supported on the Rock Distro. Further troubleshooting would be challenging to pinpoint the issue since it is not supported.

The best pointers going forward:

Intriguing that .rrd's are written to the /var/lib/mrtg/ directory, or we should say created with zero bytes associated with them.

Either we are running into permissions or other issues, and we see that the '/var/lib/mrtg' directory is not rotating either. Either means the cron job is not doing its job or other reasons include permissions.

Take a look at the .rrd by dumping it to .xml so we can see if there is anything written.

Code: Select all

rrdtool dump some.rrd > some.xml
Take a look at the output 'some.xml' with a text editor.

Code: Select all

cat some.xml

Looking at the verbose logging on 'check_rrdtraf' by adding the -vvv switch to:
command_line

Code: Select all

$USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$ -vvv
We saw that the cronjob was functioning but will need to determine why they are not rotating out of the '/var/lib/mrtg/' directory. The system logs would likely shed some light on that.

Another option is to migrate over to one of the support Linux distros.

https://support.nagios.com/kb/article.php?id=12

https://support.nagios.com/kb/article/m ... r-892.html

Please let us know if you have further questions,
Perry
acentek
Posts: 123
Joined: Thu Jul 27, 2017 2:00 pm

Re: rrd files missing

Post by acentek »

Since there is no data going to the rrd files in question, they will not convert to xml so there is nothing to look at.

Permissions are matching the other rrd files that are working.

Migrating to another Linux system is probably not going to happen, but I appreciate the suggestion.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: rrd files missing

Post by pbroste »

Hello @acenteck

Thanks for following up, what do you get when you run:

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Thanks
Perry
acentek
Posts: 123
Joined: Thu Jul 27, 2017 2:00 pm

Re: rrd files missing

Post by acentek »

Ran the command and received too much to share but here are a couple snippets.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: rrd files missing

Post by pbroste »

Hello @acentek

Thanks for following up with the screenshots. I take it that even though this is a snippet, all at showing similarities.

Theg warning / errors usually means that the interface / device that is getting polled doesn't exist anymore.

Code: Select all

WARNING: Expected a number but got 'noSuchInstance'
ERROR: Target..........' $target->[124]{$mode} ' did not eval into defined data
It could be that the device is no longer active or that the ports are disabled, etc...
To clean them up, remove the .cfg files for those devices that do not exist anymore from this folder

Code: Select all

/etc/mrtg/conf.d
That's also verify that the permission/owernship are correct for the rrd files in the /var/lib/mrtg folder. Run the following as root to fix that.

Code: Select all

chown apache.nagios /var/lib/mrtg/*
chmod 775 /var/lib/mrtg/*
Thanks,
Perry
acentek
Posts: 123
Joined: Thu Jul 27, 2017 2:00 pm

Re: rrd files missing

Post by acentek »

I have removed the unnecessary .cfg files in the /etc/mrtg/conf.d/ directory.

I ran the permissions commands you suggested. That is typically what we use when we have to create the rrd files manually. The files appear to be pulling data.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: rrd files missing

Post by pbroste »

Hello @acentek

Thanks for following up and let us know how things are looking and if you need anything further.

Regards,
Perry