This is a cache of https://support.nagios.com/kb/article/nagios-xi-error-unable-to-open-include-file-etc-mrtg-conf-d-xxxxxxx-cfg-512.html. It is a snapshot of the page at 2025-05-14T00:08:59.355+0000.
Nagios <strong>xi</strong> - ERROR: unable to open include file: /etc/mrtg/conf.d/xxxxxxx.cfg
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!

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 - Configuration Verification Failed
Viewed 19871 times since Mon, Jan 25, 2016
Nagios xi - Downloading A System Profile
Viewed 8614 times since Wed, Jul 19, 2017
Nagios xi - HTTP 500 Error / White Screen After Login
Viewed 6775 times since Mon, Feb 29, 2016
Backups are not being generated due to tar creation errors
Viewed 4155 times since Thu, Feb 27, 2020
Nagios xi - ICMP and Ping Checks Stopped Graphing
Viewed 13862 times since Mon, Jan 25, 2016
Nagios Core - Failed to register iobroker
Viewed 7201 times since Wed, Sep 20, 2017
Nagios xi - Resetting The nagiosadmin Password
Viewed 46825 times since Mon, Jan 25, 2016
Nagios xi - mysql_error out of range value for column
Viewed 6700 times since Tue, Aug 14, 2018
Nagios xi - Defining Global Environment Variables
Viewed 10874 times since Thu, Mar 17, 2016
Nagios xi - Scheduled Downtime Not Working
Viewed 7958 times since Mon, Oct 10, 2016