[mrtg] SNMP_Session error

Niall O'Reilly niall.oreilly at ucd.ie
Fri Jan 13 00:04:38 CET 2017

On 12 Jan 2017, at 22:24, Nick Price wrote:

> I have different .cfg files.
> one for each output directory with a line in my crontab for each .cfg 
> file (# out at the moment)
> How does this now work when I run mrtg as a daemon, I still need the 
> output to go to different directories.
> Do you get the daemon to call the different .cfg or is there a 
> different way of doing it?

   You can choose what suits best in your situation.

   The directory where output files are placed can be re-specified for 
each target,
   so that what you need can be achieved with one big file formed by 
   all your existing files.

   Alternatively, you could create a new "main" .cfg file, with an 
   directive for each of your existing files.  This is still a single 
   configuration, even though there are many component files.

   For either of the two methods mentioned above, you need to ensure 
that all
   your targets have different names.  For simplicity, and to make 
   or troubleshooting easier, you might move global configuration 
   to appear once in the 'main' file, before any of the 'Include' lines 
   before any of the target sections, if you prefer to use one big 

   What I did in a previous job was to run a separate daemon process for 
   of about 20 .cfg files, with a total of a couple of thousand targets. 
   tried to explain how my launcher script can manage multiple instances 
   daemon-mode MRTG.

   You don't say how many different cron jobs you've been running, so 
I've no
   idea of the scale of your operation.

   As I suggested before, you could simply continue with your cron-based
   approach, using the cronwrap script to quench the undesired noise.

   Whatever you decide, you'll need to proceed with care.

   Good luck and best regards,

   Niall O'Reilly

More information about the mrtg mailing list