Page 1 of 1

need to find/delete orphan entries from mrtg.cfg

Posted: Sun Feb 18, 2018 7:13 am
by zaji_nms
Dear Expert

We are very comfortable having one mrtg.cfg running interval of 5 minutes via crond. Now over the period, we have removed/deleted many Bandwidth services via CCM but entry lying there at /etc/mrtg/mrtg.cfg

Is there any script/tool/option, which check from mrtg.cfg as a master and if no service found in NagiosXI (/usr/local/nagios/etc/services) will delete the entry from mrtg.cfg?

In other words, want to remove orphan entries from /etc/mrtg/mrtg.cfg

Regards

Re: need to find/delete orphan entries from mrtg.cfg

Posted: Mon Feb 19, 2018 1:43 pm
by npolovenko
Hello, @zaji_nms. I don't think there are any automated tools available right now. You'd need to go to the /etc/mrtg/conf.d/ folder and remove the old entries manually. You can make a backup of that folder beforehand in case if something goes wrong.
https://support.nagios.com/kb/article.php?id=510
Also, take a look at the solution offered by one of the users:
https://support.nagios.com/forum/viewto ... 13&p=46910
Let me know if you have any other questions.