<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.12.3">
</HEAD>
<BODY>
Thanks a lot!!!!<BR>
<BR>
I will try it and let you know...<BR>
<BR>
Josephine<BR>
<BR>
On Mon, 2011-02-28 at 12:20 -0800, Brian Majeska wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Here you go, its not pretty but it works, you'll need to adjust the</FONT>
<FONT COLOR="#000000">variable path values as needed for your Xymon installation.</FONT>

<FONT COLOR="#000000">---------------- script ------------------------</FONT>
<FONT COLOR="#000000">#!/bin/sh -x</FONT>
<FONT COLOR="#000000">#</FONT>
<FONT COLOR="#000000"># $1 - Time stamp</FONT>
<FONT COLOR="#000000"># $2 - OID</FONT>
<FONT COLOR="#000000"># $3 - Severity Status</FONT>
<FONT COLOR="#000000"># $4 - Hostname (or IP)</FONT>
<FONT COLOR="#000000"># $5 - Message</FONT>

<FONT COLOR="#000000">XYMONCMD=/local/xymon/server/bin/xymoncmd</FONT>
<FONT COLOR="#000000">XYMONCFG=/local/xymon/server/etc/xymonserver.cfg</FONT>
<FONT COLOR="#000000">TRAPCLIENT=/local/xymon/server/ext/trap.pl</FONT>
<FONT COLOR="#000000">LOG=/var/log/snmp/trap.log</FONT>

<FONT COLOR="#000000">NODE="$4"</FONT>
<FONT COLOR="#000000">MSG="$5"</FONT>
<FONT COLOR="#000000">GHOST=yes       # yes - nodes not in DNS end up in the Xymon ghost report</FONT>
<FONT COLOR="#000000">                         # no  - nodes not in DNS send status to</FONT>
<FONT COLOR="#000000">unknown-trap-host host you need to setup in Xymon (bb-)hosts.cfg:</FONT>
<FONT COLOR="#000000">0.0.0.0   unknown-trap-host # noconn testip</FONT>

<FONT COLOR="#000000">### Test to see if its a valid hostname or IP</FONT>
<FONT COLOR="#000000">if ( host ${NODE} >/dev/null 2>&1 ); then</FONT>

<FONT COLOR="#000000">### Get FQDN from host or IP provided</FONT>
<FONT COLOR="#000000">        if ( echo ${NODE} |grep</FONT>
<FONT COLOR="#000000">'^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$' >/dev/null</FONT>
<FONT COLOR="#000000">2>&1 ); then</FONT>
<FONT COLOR="#000000">                FQDN=`host ${NODE} | awk '{print $5}'`</FONT>
<FONT COLOR="#000000">        else</FONT>
<FONT COLOR="#000000">                FQDN=`host ${NODE} | awk '{print $1}'`</FONT>
<FONT COLOR="#000000">        fi</FONT>
<FONT COLOR="#000000">else</FONT>

<FONT COLOR="#000000">### Decide if unknown trap hosts go to the ghost report or a special host</FONT>
<FONT COLOR="#000000">        if [ "${GHOST}" = 'yes' ]; then</FONT>
<FONT COLOR="#000000">                FQDN=${NODE}</FONT>
<FONT COLOR="#000000">        else</FONT>
<FONT COLOR="#000000">                FQDN='unknown-trap-host'</FONT>
<FONT COLOR="#000000">                MSG="${MSG} - Unknown Host: ${NODE}"</FONT>
<FONT COLOR="#000000">        fi</FONT>
<FONT COLOR="#000000">fi</FONT>

<FONT COLOR="#000000">FQDN=`echo ${FQDN} | sed 's/-man//'`</FONT>

<FONT COLOR="#000000">${XYMONCMD} --env=${XYMONCFG} ${TRAPCLIENT} -C -D -s $3 -t ${FQDN} -d</FONT>
<FONT COLOR="#000000">"$1" -m "${MSG} ($2)" >> $LOG</FONT>

<FONT COLOR="#000000">------------end script---------------------</FONT>

<FONT COLOR="#000000">--</FONT>
<FONT COLOR="#000000">Brian Majeska</FONT>



<FONT COLOR="#000000">On Thu, Feb 24, 2011 at 6:51 AM, Josephine Tsikoudaki</FONT>
<FONT COLOR="#000000"><<A HREF="mailto:jtsikoudaki@ontelecoms.com">jtsikoudaki@ontelecoms.com</A>> wrote:</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> Hello</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> Can you help on how you did that? I have my snmp traps coming with IPs and</FONT>
<FONT COLOR="#000000">> hobbit wont display them...</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> Thanks!</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> Josephine</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> On Sun, 2011-01-16 at 17:50 -0800, Brian Majeska wrote:</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> Yes, you can have a separate trap column for each host.  The trap.sh</FONT>
<FONT COLOR="#000000">> script that comes in the tar download on that page feeds the IP or</FONT>
<FONT COLOR="#000000">> hostname to the trap.pl script which reports the status to Xymon.</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> I tweaked my trap.sh script to do dns lookups for all traps that come</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> in without a hostname so they can be reported to xymon with the</FONT>
<FONT COLOR="#000000">> correct hostname.</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> --</FONT>
<FONT COLOR="#000000">> Brian Majeska</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> On Fri, Jan 14, 2011 at 2:19 PM, Ryan Novosielski <<A HREF="mailto:novosirj@umdnj.edu">novosirj@umdnj.edu</A>></FONT>
<FONT COLOR="#000000">> wrote:</FONT>
<FONT COLOR="#000000">>> -----BEGIN PGP SIGNED MESSAGE-----</FONT>
<FONT COLOR="#000000">>> Hash: SHA1</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> The only thing that isn't clear is whether it would be possible to split</FONT>
<FONT COLOR="#000000">>> the things out and have them show up under the equipment that they</FONT>
<FONT COLOR="#000000">>> originate from (eg. a trap comes from a monitored server that I have --</FONT>
<FONT COLOR="#000000">>> can I have it show up as an issue under than server rather than one</FONT>
<FONT COLOR="#000000">>> thing that just says "traps" under the Xymon server status). But I</FONT>
<FONT COLOR="#000000">>> haven't looked at all, so we'll see.</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> On 01/14/2011 05:11 PM, Xymon User in Richmond wrote:</FONT>
<FONT COLOR="#000000">>>> Way kewl.  Canned version of a WAG definitely beats rolling your own.</FONT>
<FONT COLOR="#000000">>>></FONT>
<FONT COLOR="#000000">>>> On Fri, January 14, 2011 16:56, Ryan Novosielski wrote:</FONT>
<FONT COLOR="#000000">>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1</FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>> Thanks a bunch! I had sniffed around some and had read an FAQ or two but</FONT>
<FONT COLOR="#000000">>>>> only saw DevMon. The relevant link here is:</FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>> <A HREF="http://cerebro.victoriacollege.edu/hobbit-trap.html">http://cerebro.victoriacollege.edu/hobbit-trap.html</A></FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>> Have a nice weekend!</FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>> On 01/14/2011 04:31 PM, Williams, Doug (Consultant-RIC) wrote:</FONT>
<FONT COLOR="#000000">>>>>> <A HREF="http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/Other_Docs/FA">http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/Other_Docs/FA</A></FONT>
<FONT COLOR="#000000">>>>>> Q #Q._How_do_I_enable_SNMP_monitoring_with_Hobbit_Server.3F</FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>> -----Original Message----- From: Xymon User in Richmond</FONT>
<FONT COLOR="#000000">>>>>> [mailto:<A HREF="mailto:hobbit@epperson.homelinux.net">hobbit@epperson.homelinux.net</A>] Sent: Friday, January 14, 2011</FONT>
<FONT COLOR="#000000">>>>>> 4:15 PM To: <A HREF="mailto:xymon@xymon.com">xymon@xymon.com</A> Subject: Re: [xymon] SNMP destination (eg.</FONT>
<FONT COLOR="#000000">>>>>> not DevMon)</FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>> On Fri, January 14, 2011 15:52, Ryan Novosielski wrote:</FONT>
<FONT COLOR="#000000">>>>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1</FONT>
<FONT COLOR="#000000">>>>>>></FONT>
<FONT COLOR="#000000">>>>>>> Hi all,</FONT>
<FONT COLOR="#000000">>>>>>></FONT>
<FONT COLOR="#000000">>>>>>> Is anyone aware of any direction I might look for supporting</FONT>
<FONT COLOR="#000000">>>>>>> RECEIVING SNMP traps from devices (not querying them via SNMP)? I</FONT>
<FONT COLOR="#000000">>>>>>> have a device that can set an SNMP destination, but I don't believe</FONT>
<FONT COLOR="#000000">>>>>>> has support for being queried by SNMP (if it does, it is a slightly</FONT>
<FONT COLOR="#000000">>>>>>> moot point as it</FONT>
<FONT COLOR="#000000">>>>>> is</FONT>
<FONT COLOR="#000000">>>>>>> not on a network that can be accessed easily remotely).</FONT>
<FONT COLOR="#000000">>>>>>></FONT>
<FONT COLOR="#000000">>>>>>> Happy to just hear the name of a script or software if you know of</FONT>
<FONT COLOR="#000000">>>>>> one.</FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>> Just a WAG, but I'd try pointing it at an snmptrapd and then monitor</FONT>
<FONT COLOR="#000000">>>>>> the log.  But maybe someone knows a better way.</FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>> To unsubscribe from the xymon list, send an e-mail to</FONT>
<FONT COLOR="#000000">>>>>> <A HREF="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</A></FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>> To unsubscribe from the xymon list, send an e-mail to</FONT>
<FONT COLOR="#000000">>>>>> <A HREF="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</A></FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>>></FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>> - -- - ---- _  _ _  _ ___  _  _  _ |Y#| |  | |\/| |  \ |\ |  | |Ryan</FONT>
<FONT COLOR="#000000">>>>> Novosielski - Sr. Systems Programmer |$&| |__| |  | |__/ | \| _|</FONT>
<FONT COLOR="#000000">>>>> |<A HREF="mailto:novosirj@umdnj.edu">novosirj@umdnj.edu</A> - 973/972.0922 (2-0922) \__/ Univ. of Med. and</FONT>
<FONT COLOR="#000000">>>>> Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP</FONT>
<FONT COLOR="#000000">>>>> SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG</FONT>
<FONT COLOR="#000000">>>>> with Mozilla - <A HREF="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</A></FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>> iEYEARECAAYFAk0wxpoACgkQmb+gadEcsb4b3QCgyAf7MQStVNu1wZh7d8DU9Iyq</FONT>
<FONT COLOR="#000000">>>>> XSoAoKuv7aM3KCiP7QlFnDlBBjvTfQSa =2CvN -----END PGP SIGNATURE-----</FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>>> To unsubscribe from the xymon list, send an e-mail to</FONT>
<FONT COLOR="#000000">>>>> <A HREF="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</A></FONT>
<FONT COLOR="#000000">>>>></FONT>
<FONT COLOR="#000000">>>></FONT>
<FONT COLOR="#000000">>>></FONT>
<FONT COLOR="#000000">>>></FONT>
<FONT COLOR="#000000">>>> To unsubscribe from the xymon list, send an e-mail to</FONT>
<FONT COLOR="#000000">>>> <A HREF="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</A></FONT>
<FONT COLOR="#000000">>>></FONT>
<FONT COLOR="#000000">>>></FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> - --</FONT>
<FONT COLOR="#000000">>> - ---- _  _ _  _ ___  _  _  _</FONT>
<FONT COLOR="#000000">>> |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer</FONT>
<FONT COLOR="#000000">>> |$&| |__| |  | |__/ | \| _| |<A HREF="mailto:novosirj@umdnj.edu">novosirj@umdnj.edu</A> - 973/972.0922 (2-0922)</FONT>
<FONT COLOR="#000000">>> \__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark</FONT>
<FONT COLOR="#000000">>> -----BEGIN PGP SIGNATURE-----</FONT>
<FONT COLOR="#000000">>> Version: GnuPG v1.4.10 (GNU/Linux)</FONT>
<FONT COLOR="#000000">>> Comment: Using GnuPG with Mozilla - <A HREF="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</A></FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> iEYEARECAAYFAk0wy/gACgkQmb+gadEcsb647wCfZ90Oo0b3rvhnHfdJNKjek0I2</FONT>
<FONT COLOR="#000000">>> znwAn311dNn6ebXTpf9ZOQkVQfPhtZb9</FONT>
<FONT COLOR="#000000">>> =b6gV</FONT>
<FONT COLOR="#000000">>> -----END PGP SIGNATURE-----</FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>> To unsubscribe from the xymon list, send an e-mail to</FONT>
<FONT COLOR="#000000">>> <A HREF="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</A></FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">>></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> To unsubscribe from the xymon list, send an e-mail to</FONT>
<FONT COLOR="#000000">> <A HREF="mailto:xymon-unsubscribe@xymon.com">xymon-unsubscribe@xymon.com</A></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> _______________________________________________</FONT>
<FONT COLOR="#000000">> Xymon mailing list</FONT>
<FONT COLOR="#000000">> <A HREF="mailto:Xymon@xymon.com">Xymon@xymon.com</A></FONT>
<FONT COLOR="#000000">> <A HREF="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</A></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>