Search found 19 matches

by jbeaujour
Fri Mar 03, 2017 10:42 am
Forum: Open Source Nagios Projects
Topic: NRPE : log_facility
Replies: 1
Views: 4405

NRPE : log_facility

Hello, Now we have "log_facility=daemon" parameter in ./etc/nrpe.cfg. We want to have a special value "log_facility=local6" for rsyslog for this parameter in a custom config file ./etc/conf.d/nrpe-custom.cfg. /etc/rsyslog.conf have a parameter "local6.* /var/log/nrpe.log&quo...
by jbeaujour
Wed Apr 13, 2016 11:21 am
Forum: Open Source Nagios Projects
Topic: Help with MACRO LASTSERVICESTATE
Replies: 12
Views: 4508

Re: Help with MACRO LASTSERVICESTATE

This is our release :
Nagios Core 3.2.1
Last Modified: 03-09-2010

I have tested also on ICINGA with the same result
Icinga 1.8.4
Last Modified: 01-13-2013
by jbeaujour
Wed Apr 13, 2016 3:51 am
Forum: Open Source Nagios Projects
Topic: Help with MACRO LASTSERVICESTATE
Replies: 12
Views: 4508

Re: Help with MACRO LASTSERVICESTATE

Hello, The exit is a number call in a hash table (my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3) The problem is with nagios who don't deliver the attempted value of macro $LASTSERVICESTATE$ every check but only every 2 check. Is there parameter of nagios who force last state to don't c...
by jbeaujour
Mon Apr 11, 2016 2:41 am
Forum: Open Source Nagios Projects
Topic: Help with MACRO LASTSERVICESTATE
Replies: 12
Views: 4508

Re: Help with MACRO LASTSERVICESTATE

Hello, here is the part code for exit : .... my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3); .... $lastResult = $o_lastservicestate; switch ($lastResult) { case "OK" { $newResult = "WARNING"; } case "WARNING" { $newResult = "OK"; } else { $newRes...
by jbeaujour
Fri Apr 08, 2016 6:41 am
Forum: Open Source Nagios Projects
Topic: Help with MACRO LASTSERVICESTATE
Replies: 12
Views: 4508

Re: Help with MACRO LASTSERVICESTATE

Other information, in thruk log there is only 1/2 check logged at 27, 37, 47 an 57mn. Not 32, 42, 52 !! [2016-04-08 11:57:01] SERVICE ALERT: host.recette.fr;dmon-bsmc-heartbeat-evt.appl-bsm-connector;OK;HARD;1;OK: HOSTNAME NAGIOS:host.recette.fr, LASTSERVICESTATE NAGIOS: WARNING force a OK [2016-04-...
by jbeaujour
Fri Apr 08, 2016 3:29 am
Forum: Open Source Nagios Projects
Topic: Help with MACRO LASTSERVICESTATE
Replies: 12
Views: 4508

Re: Help with MACRO LASTSERVICESTATE

Hello, We use gearman worker to execute the plugin, so there is 4 server who can execute the script. Using file flag is not recommended. Here the simplified perl code : # Recuperation du dernier etat du service et force nouvel etat $lastResult = $o_lastservicestate; switch ($lastResult) { case "...
by jbeaujour
Thu Apr 07, 2016 11:38 am
Forum: Open Source Nagios Projects
Topic: Help with MACRO LASTSERVICESTATE
Replies: 12
Views: 4508

Re: Help with MACRO LASTSERVICESTATE

Hello,
Our client use a broker HP BSM and want to control if alert are well take by BSM.
So he demand us an alternate state to create a refresh in BSM every 5mn
We want to use LASTSERVICESTATE to be independant of flag file or other method
Thank's
by jbeaujour
Wed Apr 06, 2016 10:34 am
Forum: Open Source Nagios Projects
Topic: Help with MACRO LASTSERVICESTATE
Replies: 12
Views: 4508

Help with MACRO LASTSERVICESTATE

Hello, We have defined a service who use macro $LASTSERVICESTATE$. We want the plugin to alternatively return a OK and WARNING state. He get le content of $LASTSERVICESTATE$ and force the new state like this : if last eq OK then new = WARNING, if last eq WARNING then new = OK It don't works as we wo...
by jbeaujour
Tue Mar 01, 2016 11:51 am
Forum: Open Source Nagios Projects
Topic: [SOLVED] CUSTOM VARIABLE and EXTERNAL COMMAND
Replies: 1
Views: 781

[SOLVED] Re: CUSTOM VARIABLE and EXTERNAL COMMAND

It's solved ! To view the custom variable : echo -e 'GET hosts\nColumns: custom_variable_names custom_variable_values custom_variables display_name ' | unixcat /var/lib/icinga/live Why it seems to don't work : i have on template definition "_THRES_FSYS_M" with underscore first i use it wit...
by jbeaujour
Tue Mar 01, 2016 10:49 am
Forum: Open Source Nagios Projects
Topic: [SOLVED] CUSTOM VARIABLE and EXTERNAL COMMAND
Replies: 1
Views: 781

[SOLVED] CUSTOM VARIABLE and EXTERNAL COMMAND

Hello, We use HOST CUSTOM VARIABLE in template file for all our WINDOWS servers. We want to modify the value of those MACRO by external command I try CHANGE_CUSTOM_HOST_VARIABLE like this : /usr/bin/printf "[%lu] CHANGE_CUSTOM_HOST_VAR;host1;_THRES_FSYS_M;10%%\n" $now > $commandfile By liv...