PDA

View Full Version : Multiple values in SNMP as a text


mma
14-04-2010, 13:15
Hi (again)

I have (again !) a question... It's for a test, not really a problem :
I want to obtain the name of all of processes by SNMP protocol; I found this OID witch works with Linux/Unix and Windows :
.1.3.6.1.2.1.25.4.2.1.2
But it's not a value, it's a sub-tree, and getif returns something like that :
iso.3.6.1.2.1.25.4.2.1.2.1 = STRING: "init"
iso.3.6.1.2.1.25.4.2.1.2.2 = STRING: "kthreadd"
iso.3.6.1.2.1.25.4.2.1.2.3 = STRING: "migration/0"
iso.3.6.1.2.1.25.4.2.1.2.4 = STRING: "ksoftirqd/0"
iso.3.6.1.2.1.25.4.2.1.2.5 = STRING: "watchdog/0"
iso.3.6.1.2.1.25.4.2.1.2.6 = STRING: "events/0"
iso.3.6.1.2.1.25.4.2.1.2.7 = STRING: "khelper"
(result obtain with snmpwalk exactly )

and I don't see how zabbix can interpret this "table" or how I can make...

I discover zabbix since 12 days. I must study this software 10 weeks... and I have 3-4 questions by day, even though I am always reading documentation...
So, sorry for my several posts on this great forum ! (and sorry for my bad and poor English...)

Jun.Liu
14-04-2010, 13:28
if you want to get each value, just adding one more digit at the end of the OID. for example, get the 2nd line string "kthreadd".

set ".1.3.6.1.2.1.25.4.2.1.2.2" in the OID filed, Zabbix will get you back the string "kthreadd".

mma
14-04-2010, 13:36
Yes I know that but I don't know if I can't store all names in a text for example.
Like :
"
init
kthreadd
migration/0
ksoftirqd/0
watchdog/0
events/0
"
To check the presence of a process, the number of occurs of the same process,etc... It seams impossible with SNMP protocol...? It's very dynamic and OID aren't fix.

Jun.Liu
14-04-2010, 13:50
for collecting these data, maybe better to use the UserParameter on Zabbix agent to implement your purpose.

please check:
http://www.zabbix.com/documentation/1.8/manual/config/user_parameters?s[]=userparameter

mma
14-04-2010, 13:57
ok thank you very much.
It shows the limit of SNMP features. That's why I like zabbix agent :rolleyes:
bye !