KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

SNMP Trap values from vcenter
Goto page 1, 2  Next
 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
cshenberger



Joined: 11 Aug 2008
Posts: 26

PostPosted: Wed Sep 21, 2016 10:35 am    Post subject: SNMP Trap values from vcenter Reply with quote

I am trying to configure tests to receive traps from vmware and report the values from the test.


I don't want to use %TrapAllValues_Name% because i get them all but I want the subject of the email to be the trap value of the third variable.

How can i setup my trap receiver to email on all but my email to break out the variables


So here are the current results


%TrapAllValues% ==
1.3.6.1.4.1.6876.4.3.308.0 = 3
1.3.6.1.4.1.6876.4.3.304.0 = Gray
1.3.6.1.4.1.6876.4.3.305.0 = Red
1.3.6.1.4.1.6876.4.3.306.0 = TrapTestAlarm - State = Powered off
1.3.6.1.4.1.6876.4.3.307.0 = computername


%TrapAllValues_Name% ==
iso.org.dod.internet.private.enterprises.vmware.vmwProductSpecific.vmwVC.vmwVpxdTargetObjType = 3 iso.org.dod.internet.private.enterprises.vmware.vmwProductSpecific.vmwVC.vmwVpxdOldStatus = Gray iso.org.dod.internet.private.enterprises.vmware.vmwProductSpecific.vmwVC.vmwVpxdNewStatus = Red iso.org.dod.internet.private.enterprises.vmware.vmwProductSpecific.vmwVC.vmwVpxdObjValue = TrapTestAlarm - State = Powered off iso.org.dod.internet.private.enterprises.vmware.vmwProductSpecific.vmwVC.vmwVpxdTargetObj = computername


I want the email to read something like

Subject: Computername has changed from gray to red
Body:

Test traptestalarm - state = Powered off, the old status was gray and the new status is red
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Wed Sep 21, 2016 10:55 am    Post subject: Reply with quote

Quote:
I want the email to read something like
Subject: Computername has changed from gray to red

Then you need several test items.
E.g.
set the following option for "TestRed" Counters fit expression ('%1.3.6.1.4.1.6876.4.3.304.0%' == 'Gray') and ('%1.3.6.1.4.1.6876.4.3.305.0%' == 'Red')

set the following option for "TestGray" Counters fit expression ('%1.3.6.1.4.1.6876.4.3.304.0%' == 'Red') and ('%1.3.6.1.4.1.6876.4.3.305.0%' == 'Gray')"

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
cshenberger



Joined: 11 Aug 2008
Posts: 26

PostPosted: Wed Sep 21, 2016 11:13 am    Post subject: Reply with quote

Can i put the value of the oid in the email though?



Also can I make so when goes from Yellow to Green is the clear
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Wed Sep 21, 2016 11:23 am    Post subject: Reply with quote

If you setup test using "message contains OID" option, then yes.
E.g. you setup single test item with the following option
message contains OID 1.3.6.1.4.1.6876.4.3.305.0 <> ''

Then you may use %MibValue% variable in e-mail subject:
has changed to %MibValue%

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
cshenberger



Joined: 11 Aug 2008
Posts: 26

PostPosted: Wed Sep 21, 2016 11:27 am    Post subject: Reply with quote

so for these tests I would setup 2 tests for each type of monitor for vmware. is there a better way to monitor for vmware snmp?

I am looking to get information like vshield agent lost connection, bootbank errors....

they all send same traps but the values change depending on the tests

and can i verify they clear based on the same expression?
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Wed Sep 21, 2016 12:51 pm    Post subject: Reply with quote

1. You may setup only 1 test items that will send e-mail with subject like:
Test traptestalarm - state = Powered off STATUS: Gray -> Red
Set the following options:
Message contains OID 1.3.6.1.4.1.6876.4.3.306.0 That is <> from !
Enable "Tune up Reply value" option with expression like the following:
%MibValue% STATUS: [('%TrapAllValues%' getword 6)] -> [('%TrapAllValues%' getword 9)]

This SNMP Trap test item will catch all events.

Just use %Reply% variable in e-mail subject.

2. If you need to see current state of some parameter, use separate test item for each counter:
Counters fit expression: ('Power' in '%1.3.6.1.4.1.6876.4.3.306.0%') and ('%1.3.6.1.4.1.6876.4.3.305.0%' <> 'Green')

Set "Ok" status if received message satisfies:
Counters fit expression: ('Power' in '%1.3.6.1.4.1.6876.4.3.306.0%') and ('%1.3.6.1.4.1.6876.4.3.305.0%' == 'Green')

"Tune up Reply value" expression can be the same as for previous config:
%MibValue% STATUS: [('%TrapAllValues%' getword 6)] -> [('%TrapAllValues%' getword 9)]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Wed Sep 21, 2016 2:25 pm    Post subject: Reply with quote

If you are using HostMonitor 10.30, there is update for you
www.ks-soft.net/download/hm1031.zip
unzip and replace hostmon.exe module

Then you will be able to use variables like
%OidVal.1.3.6.1.4.1.6876.4.3.304.0%
%OidVal.1.3.6.1.4.1.6876.4.3.305.0%
%OidVal.1.3.6.1.4.1.6876.4.3.307.0%

Subject: %OidVal.1.3.6.1.4.1.6876.4.3.307.0% has changed from %OidVal.1.3.6.1.4.1.6876.4.3.304.0% to %OidVal.1.3.6.1.4.1.6876.4.3.305.0%

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
cshenberger



Joined: 11 Aug 2008
Posts: 26

PostPosted: Wed Sep 21, 2016 2:30 pm    Post subject: Reply with quote

Alex,

I will work on this but I am not sure where "tune up reply value is"

we are using hostmon 10.20. if we upgrade and use the new then it will work?


Thank you,
Back to top
View user's profile Send private message
cshenberger



Joined: 11 Aug 2008
Posts: 26

PostPosted: Wed Sep 21, 2016 2:33 pm    Post subject: Reply with quote

does 10.30 require new RMA version? We have several RMA servers so upgrade takes a little while
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Wed Sep 21, 2016 4:31 pm    Post subject: Reply with quote

Quote:
does 10.30 require new RMA version? We have several RMA servers so upgrade takes a little while

Probably everything will work but we do not test such configs. Please use all components from the same package.
RMA Manager allows you to update agents in minutes

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Wed Sep 21, 2016 4:34 pm    Post subject: Reply with quote

Quote:
we are using hostmon 10.20. if we upgrade and use the new then it will work?

Options like the following will work in version 10.20 or 10.30 or 10.31
Counters fit expression: ('Power' in '%1.3.6.1.4.1.6876.4.3.306.0%') and ('%1.3.6.1.4.1.6876.4.3.305.0%' <> 'Green')

Variables like %OidVal.1.3.6.1.4.1.6876.4.3.304.0% supported by version 10.31 only

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
cshenberger



Joined: 11 Aug 2008
Posts: 26

PostPosted: Thu Sep 22, 2016 6:34 am    Post subject: Reply with quote

I am still not sure where to set

"tune up reply value"

can you explain this?
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Thu Sep 22, 2016 7:10 am    Post subject: Reply with quote

"Tune up Reply value" option is located on "Test properties" dialog and can be hidden.
Just press small [+] icon above "Help" button to show "Optional status processing" section.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cshenberger



Joined: 11 Aug 2008
Posts: 26

PostPosted: Thu Sep 22, 2016 12:16 pm    Post subject: Reply with quote

Alex,

If I use counters fit expression

('vShield' in '%1.3.6.1.4.1.6876.4.3.306.0%') and ('%1.3.6.1.4.1.6876.4.3.305.0%' <> 'Green')

The trap doesn't set an alarm, however these are the results if I leave it at "any"

Trap Values: 1.3.6.1.4.1.6876.4.3.308.0 = 3
1.3.6.1.4.1.6876.4.3.304.0 = Red
1.3.6.1.4.1.6876.4.3.305.0 = Green
1.3.6.1.4.1.6876.4.3.306.0 = vShield VirtualMachine Alarm - vim.event.EventEx (com.vmware.vshield.zones.dvfilterSettingsChanged) OR vim.event.VmReconfiguredEvent
1.3.6.1.4.1.6876.4.3.307.0 = vmname
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Thu Sep 22, 2016 12:32 pm    Post subject: Reply with quote

This is correct behaviour.
Expression
('vShield' in '%1.3.6.1.4.1.6876.4.3.306.0%') and ('%1.3.6.1.4.1.6876.4.3.305.0%' <> 'Green')
Will detect items if 1.3.6.1.4.1.6876.4.3.305.0 is not equal to Green
If you need alet for any vmwVpxdNewStatus value just leave only first part of the expression:
('vShield' in '%1.3.6.1.4.1.6876.4.3.306.0%')
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index