[mrtg] SNMP_Session error

Niall O'Reilly niall.oreilly at ucd.ie
Mon Jan 9 13:08:33 CET 2017

On 8 Jan 2017, at 19:24, Nick Price wrote:

> I use 1 configuration file per user, and output to a folder only the 
> user has access to
> Each config file can have 1 or more devices in it.
> I don't get how to run mrtg with multiple .cfg files

   I'm guessing you have a single .cfg file with per-user "Include" 
   Is this the way you've set things up ?

   With multiple instances of MRTG running, three things are crucial:
   (a) identifying the proper .cfg file for each instance,
   (b) ensuring that there is no overlap between the .cfg files, and
   (c) ensuring that each instance of MRTG is allowed to run only once.

   Having more than one instance of MRTG (whether running from cron or
   in daemon mode) writing to your data archive (log or RRD files) will
   make rubbish of the archive.  I'ld suggest running any new 
   on a test system or with an independent set of output folders so that
   anything that goes wrong will not be apparent to your users.

   Don't forget that any (residual) cron-based MRTG activity needs to be
   taken into consideration when planning to avoid overlap.

   Having more than one instance of MRTG poll the same device is 
   not a cause for concern during transition.

   What my launcher script is intended to do is described by the
   pseudo-code (for the 'start' operation) shown below.

     for each configuration file found in the "standard place":
         construct a corresponding name for a distinct PID file
         start MRTG using this pair of configuration and PID files

   Other operations ('status', 'stop') are implement in a similar way.

> I don't get the bit in the documentation about the S file in 
> /etc/rc3.d   how do I know what number after the S to use and do I 
> need to place in all the rc*.d directories.

   It used to be that chkconfig would do what's needed to get this 
   I'm not aware that this is different since the introduction of 
   There's usually a "loaded" comment in each launcher script which is
   used by chkconfig.

> Having never done this before,

   You'll need thorough testing.

> the only other thing I install is Nagios and it comes with an 
> install-daemon.

   Best regards,

   Niall O'Reilly

More information about the mrtg mailing list