Page 2 of 2

Re: rrd files missing

Posted: Wed Feb 23, 2022 5:47 pm
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

Re: rrd files missing

Posted: Fri Feb 25, 2022 4:51 pm
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.

Re: rrd files missing

Posted: Mon Feb 28, 2022 5:40 pm
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

Re: rrd files missing

Posted: Mon Mar 07, 2022 11:33 am
by acentek
Ran the command and received too much to share but here are a couple snippets.

Re: rrd files missing

Posted: Tue Mar 08, 2022 5:33 pm
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

Re: rrd files missing

Posted: Wed Mar 09, 2022 9:44 am
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.

Re: rrd files missing

Posted: Fri Mar 11, 2022 6:03 pm
by pbroste
Hello @acentek

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

Regards,
Perry