This is the exact problem I have encountered for awhile. The problem to take out the snmp community string variable and put it into a variable that is readable by custom nagios plugins. I have actually asked for a solution back then, but to no avail.
I hope that there’s a workaround to this.
···
On Thu, Mar 5, 2015 at 4:55 PM, Marcel Schulte schulte.marcel@gmail.com wrote:
Hi Denis,
last 1.2.2 release (1.2.2p3) is from 11/2013, that was 17 months ago and 1.2.6 stable just got released some days ago…
Sometimes things get better with time going (and coding happening), what about updating to latest 1.2.4p5 or the new 1.2.6? For sure you have to be aware of and follow the migration notes but I think it’s worth the work.
BTW: according to http://mathias-kettner.de/checkmk_configvars.html variable host_check_commands does support the suggested rules since 1.2.3i1…
Regards,
Marcel
Denis Barbazza denis.barbazza@gmail.com schrieb am Do., 5. März 2015 um 08:43 Uhr:
Hi Marcel, Javier,
thanks for the hint, I’m using 1.2.2 but it already has “Host check command”.
What I need is to pass to this command the SNMP community configured in WATO.
I have a different commuity for almost any device! And i already have configured it.
Thanks Javier, the problem is that the community is not the same. So I can’t put it in the resource.cfg. The community is already configured for each device in wato → ruleset → access to agents → SNMP communities of monitored hosts. I just want to use this variable in my host check. is it possible?
thanks
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
–
On Wed, Mar 4, 2015 at 3:26 PM, Javier Lobato Alonso javier@ursaiz.com wrote:
If you want to use the nagios check (in WATO > Rules > Active Checks > “Classical active and passive Nagios checks”), you have to edit the resource.cfg and add for example:
$USER5$=public
Then in the rule command line :
$USER1$ check_snmp -H $HOSTADDRESS$ -C $USER5$ …etc (other options)
–
Denis
2015-03-04 15:08 GMT+01:00 Denis Barbazza denis.barbazza@gmail.com:
Hi Javier,
thanks for your reply.
But I already have the snmp community defined for each in hosts in WATO (SNMP communities of monitored hosts).
How can i use this variable?
–
Un saludo,
Javier Lobato Alonso
On Wed, Mar 4, 2015 at 2:54 PM, Javier Lobato Alonso javier@ursaiz.com wrote:
Hello Denis,
You can define your own macros in the configuration file resource.cfg , i hope this can help you:
/omd/sites/yoursite/etc/nagios/resource.cfg
############################################
OMD settings, please use them to make your config
portable, but dont change them
$USER1$=/omd/sites/yoursite/lib/nagios/plugins
$USER2$=/omd/sites/yoursite/local/lib/nagios/plugins
$USER3$=yoursite
$USER4$=/omd/sites/yoursite
############################################
set your own macros here:
#$USER5$=…
Denis
–
2015-03-04 14:48 GMT+01:00 Denis Barbazza denis.barbazza@gmail.com:
Hi, I’ve googled a lot but i still found no answer on this. Only some suggestions but nothing definitive.
In fact, my problem is:
- I have an SNMP host that is not pingable, I can only check it with snmp
- I want that host status reflect the status of service SNMP Info
The easiest solution that i found is to configure with wato the host checks with command:
“check_mk”
but in this case the checks will be applied two times (one for host and one for the service status.
Another thing that i tried is to use as host check command:
check_mk-snmp_info
but in this case it returns to me that it is a passive command (correclty).
I would like to use the legacy check
check_snmp
i only need the snmp community!
I’ve already configured in wato the community variable for each host, how can i use it in a command line of a nagios legacy commands (just like $HOSTADDRESS$)?
Denis
thank you all
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
Un saludo,
Javier Lobato Alonso
–
Best Regards,
Ahmad Siddiq b. Mohd AdnanSenior System Engineer, Xchanging Malaysia Sdn Bhd
International Award for Young People, Gold Award
LPIC-3, Novell CLA, Novell DCTech, CCENT, Microsoft Certified Professional, MCTS Windows Server 2008
Mobile: +60 17 377-5007| Facebook: https://www.facebook.com/my.sidz