| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| Not really Routers2, but related :P http://www.steveshipway.org/forum/viewtopic.php?f=15&t=1607 |
Page 1 of 1 |
| Author: | SubnetZero [ Tue Aug 12, 2008 10:26 am ] |
| Post subject: | Not really Routers2, but related :P |
How you guys starting your MRTG polls in cron? I was putting each line in the crontab for each .cfg file, but that gets old quick... I changed mine over to use a .sh file with a find command Crontab entry: */5 * * * * /usr/local/mrtg-2/cfg/mrtgcron.sh mrtgcron.sh file: cd /usr/local/mrtg-2/cfg find ./ -name "*.cfg" -maxdepth 1 -exec /usr/local/mrtg-2/bin/mrtg {} --logging /var/log/mrtg.log \; I don't use grouping, but I have some "test" files in a sub-dir for trying different things so I use the maxdepth option... How is everyone else calling theirs? |
|
| Author: | stevesh [ Tue Aug 12, 2008 1:47 pm ] |
| Post subject: | Re: Not really Routers2, but related :P |
The recommended way is to use a master.cfg file and daemon mode. You create a single master.cfg which uses Include: to include all the other cfg files (you may need to regularly autogenerate this) and also routers.cgi*Ignore:yes to stop routers2 processing it. Then use daemon mode RunAsDaemon:yes in the file to start MRTG just once, with the Forks: directive set to ensure multithreading. We don't actually do this, though, as we use a homegrown scheduler to run the various cfg files at intervals spread over the 5-min window. This is because I want to guarantee that certain polls are run in a specific sequence which is not possible if you have multithreading. |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|