THIS KNOWLEDGE BASE HAS BEEN ARCHIVED AND IS NO LONGER BEING UPDATED
Please visit library.nagios.com/docs for the latest and most up-to-date documentation.
Home » Categories » Products » Nagios XI » Troubleshooting » Common Problems

Nagios XI - ERROR: unable to open include file: /etc/mrtg/conf.d/xxxxxxx.cfg

Problem Description

Bandwidth graphs in Nagios XI are showing no bandwidth.

When manually executing MRTG you see the following output:

MRTG Manual Command:

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

This error is produced:

ERROR: unable to open include file: /etc/mrtg/conf.d/xxxxxxx.cfg

 

The source of the problem is that you have 1000+ cfg files in the /etc/mrtg/conf.d/ directory. When MRTG runs it has to open all the files and it hits the open file limits in Linux.

 

 

Editing Files

In this article you will be required to edit files. This documentation will use the vi text editor. When using the vi
editor:

  • To make changes press i on the keyboard first to enter insert mode
  • Press Esc to exit insert mode
  • When you have finished, save the changes in vi by typing :wq and press Enter

 

 

Resolution

These steps will increase the open file limits from the default of 1024 to 4096.

Establish an SSH session to your Nagios XI server and edit the file /etc/security/limits.conf

Add the following lines to the end of the file:

* soft nofile 10000
* hard nofile 10000

Save the file.

 

Now try running MRTG manually should no longer produce the "ERROR: unable to open include file: /etc/mrtg/conf.d/xxxxxxx.cfg" message:

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

 

If you still experience the error, please reboot the server and try running MRTG again.

 

It will take at least 15 minutes for the bandwidth graphs to start showing data.

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

1 (2)
Article Rating (2 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - Installing Latest SourceGuardian Loaders
Viewed 10731 times since Mon, Jun 18, 2018
Nagios XI - HTTP 500 Error / PHP Parse error - Unexpected $end
Viewed 10201 times since Mon, Jan 25, 2016
Nagios XI - Empty Screen for Wizard, Component, Dashlet
Viewed 10298 times since Wed, Jan 27, 2016
Nagios XI - Host Still Visible After Deletion (Ghost Hosts)
Viewed 14857 times since Tue, Jan 27, 2015
Nagios XI - Common Upgrade Failures And Solutions
Viewed 17288 times since Thu, Jun 29, 2017
Nagios XI - Downloading A System Profile
Viewed 10747 times since Wed, Jul 19, 2017
Nagios XI - Apply Configuration Fails - Backend login to the Core Configuration failed
Viewed 28889 times since Tue, Aug 2, 2016
Nagios XI - WMI Authentication Problems
Viewed 7614 times since Thu, Feb 25, 2016
Nagios XI - SNMP MIB Upload Problems
Viewed 12217 times since Mon, Apr 10, 2017
ERROR: Please add the ’Optional’ channel to your Red Hat systems subscriptions
Viewed 30725 times since Tue, Jan 26, 2016