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/

0 (0)
Article Rating (No 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 - Disabling Database UTF8 Connectivity
Viewed 1325 times since Thu, Mar 8, 2018
Nagios XI - Core Configuration Mananger Display Issues
Viewed 1154 times since Tue, Jan 26, 2016
Nagios XI - Some BPI Checks Show "Unknown BPI Group Index" After Upgrade
Viewed 808 times since Wed, Sep 18, 2019
Nagios XI - Can’t Log Into The Web Interface
Viewed 21902 times since Tue, Jan 27, 2015
Nagios XI - Scheduled Downtime Not Working
Viewed 1844 times since Mon, Oct 10, 2016
Active Directory / LDAP - Troubleshooting Authentication Integration
Viewed 4783 times since Mon, Jun 26, 2017
Nagios XI - CentOS 6 Installation Problems XI 2011R1.7 2011R1.8
Viewed 1357 times since Tue, Feb 2, 2016
Nagios XI - Notifications Not Sending In XI 5.3.0
Viewed 1373 times since Tue, Oct 4, 2016
Nagios Core - Nagios did not exit in a timely manner
Viewed 2068 times since Wed, Jan 27, 2016
Nagios XI - Unable To Login Using Two Factor Authentication
Viewed 1463 times since Tue, Apr 10, 2018