Page 1 of 1
Edit the OID value
Posted: Wed Dec 28, 2011 1:55 am
by hermy7
Hi I trying monitoring cpu temperature using dell open mange and current I'm using centos OS.
I got the OID for the cpu temperature but the value have 3 digit instead of 2 digit.
the OID SNMPv2-SMI::enterprises.674.10892.1.700.20.1.6.1.1 = INTEGER: 220
in the dell open mange it show 22.0 C and in the OID value it show 220
is it there is any way that i can edit the value in nagiosxi command by / 10 so it would 22 C instead of 220 C
thanks.
Re: Edit the OID value
Posted: Wed Dec 28, 2011 11:21 am
by scottwilkerson
You could create a custom check command in
Code: Select all
Config -> Core Config Manager -> Commands -> Commands
Possibly using whatever you are using as your current command as a template for your custom one...
Re: Edit the OID value
Posted: Thu Dec 29, 2011 10:15 pm
by hermy7
can you give some examples the command where the value can be edit for like= value - 10 or value /10.
as far as I can see it not possible to modifying the value you can just add argument in to the command.
thanks.

Re: Edit the OID value
Posted: Mon Jan 02, 2012 10:29 am
by scottwilkerson
What I was referring to was the ability to make a new plugin (using the current plugin you are using as a template). Modify the plugin to divide the returned value by 10.
The ease of this depends on the type of plugin that you are modifying and your scripting ability.
Re: Edit the OID value
Posted: Tue Jan 03, 2012 9:24 pm
by hermy7
ow ok, but I'm not good on scripting well is it there is any sample or link for nagiosxi editing script.
so it will help out my learning process to edit or create my first script.
I just know the value have to be divide by 10 so i can get the right value.
V/10
but the hole script i need some guide.
thanks.

Re: Edit the OID value
Posted: Wed Jan 04, 2012 10:36 am
by lmiltchev
This guide could be very useful for creating custom plugins (or modifying the existing ones). I am not sure if it is going to be of any help in your particular case, but it's worth checking it out:
http://nagiosplug.sourceforge.net/devel ... lines.html
Re: Edit the OID value
Posted: Thu Jan 05, 2012 2:03 am
by hermy7
thx lmitchev....
em, I really appreciate if you can give some more recommendation link for edit nagios script for my references...
coz I think the link show the basic nagios scripting info and don't have sample for editing nagios script..
it was better if you can give some link that included editing nagios script...
thanks....

Re: Edit the OID value
Posted: Mon Jan 09, 2012 10:29 pm
by hermy7
some reference book for anyone need edit the nagios script....
Finally I finds it my self the link and it was helpful...
it was a greet book and worth to read..
http://books.google.com.ph/books?id=65_ ... to&f=false