Custom Scripts in General


02-03-2004 11:19:43

I've noticed there's already two different posts about adding custom scripts into Netmrg. I really like the software, because I can see lots of information at the same time. However, I have a program called qmailstats that runs as an mrtg to give graphs of how our mailserver is performing. I was wondering how would be the best way to integrate those graphs into a setup with Netmrg? I've included one of the Mrtg setups below, but even some general documentation (which I probably just didn't notice somewhere on the site) would be really beneficial for everyone.

I tried just inputting the target into a SNMP script in Netmrg, but I am only getting null values, so I guess I missed an important step somewhere. I also noticed that setting the mrtg.cfg file to output RRDTOOL format does not help it -- in fact, it cancels the graph in netmrg.

Thanks in advance!


Title[msg] MySite - Messages
MaxBytes[msg] 10000
AbsMax[msg] 20000
Options[msg] gauge
Target[msg] `/usr/local/bin/qmailmrtg7 m /var/log/qmail/qmail-send`
PageTop[msg] <B> Messages</B><br>
ShortLegend[msg] msg
YLegend[msg] msg
Legend1[msg] Total Msg
LegendI[msg] &nbsp;Deliveries
LegendO[msg] &nbsp;Attempts
WithPeak[msg] ymwd


02-03-2004 18:21:47

If I recall correctly, MRTG scripts output two values. NetMRG only accepts one value per script, so the scripts would need slight modifications in some cases.

To add a script test in NetMRG

1. Click [ba6cded5556]Scripts[/ba6cded5556] (under Tests).
2. Click [ba6cded5556]Add[/ba6cded5556].
3. Enter a name for the script test under Name.
4. Enter the path to the script. If this field does not start with a slash, it is assumed the script exists in /usr/local/libexec/netmrg/ (for a source install).
5. Select [ba6cded5556]Standard Out[/ba6cded5556] as the [ba6cded5556]Data Type[/ba6cded5556].

You can then create monitors that use your script, and from there, create custom graphs and template graphs.

Hopefully this clears things up a bit. If not, you know where to find us!