SNMP traps - filter the received messages

Need new test, action, option? Post request here.
Post Reply
Antony

SNMP traps - filter the received messages

Post by Antony »

Hello,

i have setup some snmp traps from several network equipments. What i am getting is this:

2005-09-21 17:33:13 UTC,Syslog.Debug,10.1.1.1,"uptime=10360270, generic_num=6, specific_num=1, sysContact=, sysName=NODE1, sysLocation=CITY1, 1.3.6.1.4.1.2606.4.2.3.7.2.1.1.1=1, 1.3.6.1.4.1.2606.4.2.3.7.2.1.2.1=""Temperature Sensor"", 1.3.6.1.4.1.2606.4.2.3.7.2.1.3.1=6"

2005-09-21 17:35:02 UTC,Syslog.Debug,10.1.1.1,"uptime=10371090, generic_num=6, specific_num=1, sysContact=, sysName=NODE2, sysLocation=CITY2, 1.3.6.1.4.1.2606.4.2.3.7.2.1.1.1=1, 1.3.6.1.4.1.2606.4.2.3.7.2.1.2.1=""Temperature Sensor"", 1.3.6.1.4.1.2606.4.2.3.7.2.1.3.1=4"

As you may see, these are traps sent due to an alarm at the temperature of the monitored equipment. Is there a way for the program to send me an email that will be something like this:

Date - Sysname (whatever it is) - Temperature Sensor - Alarm
(6 means Alarm)
and
Date - Sysname (whatever it is) - Temperature Sensor - 6
(4 means OK)

I see that HostMonitor is only able to reply the OID, value and some other things that don't really tell me what is going on with the equipment i am monitoring :cry:

I am really looking forward to your response!!!
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

What i am getting is this:
...
You are gettings this as counter value?
Is there a way for the program to send me an email that will be something like this:
Date - Sysname (whatever it is) - Temperature Sensor - Alarm
(6 means Alarm)
Use %DateTime% variable to show date in the mail
Use %TrapHost% to show sysname
If your devices are sending traps with various messages (not only temperature alerts) and you want to sent different mails, you should setup separate test items for each type of alert and use different e-mail templates for each kind of alert.

Regards
Alex
Guest

Post by Guest »

I am getting the whole message when i use another software, i could not get the whole message with hostmonitor. Or is there a way for hostmonitor to reply the whole message?

May i post another question here if i try your advice and still have a problem?

Thanks alot!! :wink:
Antony

Post by Antony »

Anonymous wrote:I am getting the whole message when i use another software, i could not get the whole message with hostmonitor. Or is there a way for hostmonitor to reply the whole message?

May i post another question here if i try your advice and still have a problem?

Thanks alot!! :wink:
Sorry for not posting my name (Antony) in the previous message :wink:
Guest

Post by Guest »

KS-Soft wrote:
What i am getting is this:
...
You are gettings this as counter value?
Is there a way for the program to send me an email that will be something like this:
Date - Sysname (whatever it is) - Temperature Sensor - Alarm
(6 means Alarm)
Use %DateTime% variable to show date in the mail
Use %TrapHost% to show sysname
If your devices are sending traps with various messages (not only temperature alerts) and you want to sent different mails, you should setup separate test items for each type of alert and use different e-mail templates for each kind of alert.

Regards
Alex
I used %TrapHost% and i got the ip address of the equipment.

e.g.2005-09-21 17:35:02 UTC,Syslog.Debug,10.1.1.1,"uptime=10371090, generic_num=6, specific_num=1, sysContact=, sysName=NODE2, sysLocation=CITY2, 1.3.6.1.4.1.2606.4.2.3.7.2.1.1.1=1, 1.3.6.1.4.1.2606.4.2.3.7.2.1.2.1=""Temperature Sensor"", 1.3.6.1.4.1.2606.4.2.3.7.2.1.3.1=4"

What should i use to get NODE2 instead of the ip address?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I am getting the whole message when i use another software, i could not get the whole message with hostmonitor. Or is there a way for hostmonitor to reply the whole message?
Sorry, I do not understand you. What is "whole message"?
"Display" property of the SNMP Trap test method allows you do specify what information should be displayed in "Reply" field:
- Agent address
- Trap type
- Enterprise
- OID
- Counter
- Relative value
- OID & value

Do you want to see all these properties at the same time?
HostMonitor does not show all of them in the Reply field. But you may send all these parameters in notification mail.
I used %TrapHost% and i got the ip address of the equipment.
Correct. This variable represents IP address of the host that have sent the message.
What should i use to get NODE2 instead of the ip address?
Node2? Do you mean hostname? H'm, HostMonitor does not translates address of the agent into hostname...

Regards
Alex
Antony

Post by Antony »

The equipment that i am monitoring is sending me the following message

2005-09-21 17:35:02 UTC,Syslog.Debug,10.1.1.1,"uptime=10371090, generic_num=6, specific_num=1, sysContact=, sysName=NODE2, sysLocation=CITY2, 1.3.6.1.4.1.2606.4.2.3.7.2.1.1.1=1, 1.3.6.1.4.1.2606.4.2.3.7.2.1.2.1=""Temperature Sensor"", 1.3.6.1.4.1.2606.4.2.3.7.2.1.3.1=4"

Now, is it possible for hostmonitor to send an email that will contain the ip of the equipment and the words NODE2, CITY2 and Temperature Sensor which are contained in the snmp message?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor cannot parse custom response strings. If you need custom messages, you may setup separate SNMP Trap test items for each type of the message

Regards
Alex
Antony

Post by Antony »

Um, is it possible to search in the snmp trap message for a keyword or phrase, without needing to specify the oid that contains the text string?

e.g. can i have hostmonitor look for the text "Temperature Sensor" without specifying any oid that contain it?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Its impossible in currect version. I have added your request into "do to" list

Regards
Alex
Antony

Post by Antony »

KS-Soft wrote:Its impossible in currect version. I have added your request into "do to" list

Regards
Alex
Thank you very very much, it''s very important to me :roll:

Best regards :wink:
Post Reply