How do I read alert status on FreeNAS 11.1 via snmp?

Status
Not open for further replies.

tobiasbp

Patron
Joined
Dec 2, 2015
Messages
238
Hello there...

I'm using Icinga2 to monitor a couple of FreeNAS 11.1 machines. I'm successfully monitoring my zpools like this:
Code:
vars.snmpv3_oid = "FREENAS-MIB::zpoolHealth.0"


Looking in the FREENAS-MIB file, I see some interesting OIDs:
  • alert
  • alertId
  • alertLevel
  • alertMessage
I'd like to monitor the "alertLevel" and configure Icinga2 like this:
Code:
vars.snmpv3_oid = "FREENAS-MIB::alertLevel.0"


Icinga2 says "*No Such Object available on this agent at this OID*". Then I give this a try:
Code:
vars.snmpv3_oid = "FREENAS-MIB::alertLevel"


This also results in "*No Such Object available on this agent at this OID*".

So, how do I monitor the "alertLevel"?

Thank you,
Tobias
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Looks like that alertLevel is used when generating a TRAP, not something you can get by polling it.

Code:
alert NOTIFICATION-TYPE 	
		
	OBJECTS	{ alertId, alertLevel, alertMessage } 	
		
	STATUS	 current 	
		
	DESCRIPTION 	
		
		"An alert raised" 	
		
	::= { notificationPrefix 1 } 	
		

	
		
alertId OBJECT-TYPE 	
		
	SYNTAX	 DisplayString 	
		
	MAX-ACCESS read-only 	
		
	STATUS	 current 	
		
	DESCRIPTION 	
		
		"" 	
		
	::= { notificationObjects 1 } 	
		

	
		
alertLevel OBJECT-TYPE 	
		
	SYNTAX	 AlertLevelType 	
		
	MAX-ACCESS read-only 	
		
	STATUS	 current 	
		
	DESCRIPTION 	
		
		"" 	
		
	::= { notificationObjects 2 } 	
		

	
		
alertMessage OBJECT-TYPE 	
		
	SYNTAX	 DisplayString 	
		
	MAX-ACCESS read-only 	
		
	STATUS	 current 	
		
	DESCRIPTION 	
		
		"" 	
		
	::= { notificationObjects 3 } 	
		

	
		
alertCancellation NOTIFICATION-TYPE 	
		
	OBJECTS	{ alertId } 	
		
	STATUS	 current 	
		
	DESCRIPTION 	
		
		"An alert cancelled" 	
			::= { notificationPrefix 2 }
 

tobiasbp

Patron
Joined
Dec 2, 2015
Messages
238
Looks like that alertLevel is used when generating a TRAP, not something you can get by polling it.

OK, got it. Thank you.

However, my understanding is, that I would then need to configure FreeNAS with the address to send the SNMP traps to. I can see no such field in the GUI.

The only thing I can find on the topic here, seems to indicate that sending SNMP traps is not at feature in the FreeNAS GUI.

Looking at the section ACTIVE MONITORING in the man page of snmpd, it looks as if I should be able to set up the sending of SNMP traps using the field Auxiliary parameters in the FreeNAS GUI.

Does anyone have an example of a working configuration for sending SNMP traps?
 
Last edited:
Status
Not open for further replies.
Top