PDA

View Full Version : Plugin Monitor SNMPNETSTAT


multirede
09-17-2009, 04:00 PM
Hi,

Can I to have some graphs of port test or conection between servers ?, Usualy I use snmpnetstat.
I would like to put rules equal to snmpnetstat.

rajib
09-17-2009, 07:05 PM
Using http://community.zyrion.com/showthread.php?t=64 as reference, here's a sample plug-in monitor definition:


<monitor type="netstat" plugintype="script">
<testtype>
<displayName>Established TCP Connections</displayName>
<displayCategory>network</displayCategory>
<subType>tcp</subType>
<units>conn(s)</units>
<severity_ascends_with_value>false</severity_ascends_with_value>
<defaultWarningThreshold>1</defaultWarningThreshold>
<defaultCriticalThreshold>0</defaultCriticalThreshold>
<shadowWarningThreshold>1</shadowWarningThreshold>
<shadowCriticalThreshold>0</shadowCriticalThreshold>
<slaThreshold>0</slaThreshold>
<testInterval>300</testInterval>
</testtype>

<script type="netstat" subType="tcp">
<rootScript>netstat.sh</rootScript>
<parameters>--host ${device_address}<parameters>
<waitForTerminate>true</waitForTerminate>
<timeout>60</timeout>
</script>
</monitor>


This configuration can be saved as plugin/monitors/netstat.xml under Traverse installation directory. The script (netstat.sh) should be placed under plugin/monitors/netstat directory. Don't forget to make the script executable:


su
cd /usr/local/traverse
chmod a+rx plugin/monitors/netstat/netstat.sh


Finally, Traverse components will need to be restarted after creating the XML file.

multirede
09-17-2009, 07:21 PM
Hi,

I am using windows plataform. I would like know if I will have some problem.

Best Regards.

rajib
09-17-2009, 09:20 PM
The monitor definition (XML) can be used on Windows with one small change - the rootScript parameter will need to point to a batch file (eg. snmpnetstat.cmd) instead of the current shell script. But the script that you had originally posted will not work on Windows and you will need to create a new one that performs same function using tools applicable on that platform - batch file, PowerShell, VBScript, Perl, etc.

multirede
09-17-2009, 10:11 PM
I Will make the necessary update.

Thank´s.