Ok since I'm doing this in a dev environment, i deleted all status.dat,
retention.dat, objects.cache.
In my icinga.cfg I have the following:
object_cache_file=/var/icinga/ramdisk/objects.cache
status_file=/var/icinga/ramdisk/status.dat
state_retention_file=/var/icinga/retention.dat
When I deleteted them all for some reason Icinga also created
/var/icinga/status.dat which was different than the one I specified in
/var/icinga/ramdisk/status.dat, however I think I found the issue..
We upgraded icinga 1.6.1 on this box to 1.8.1 but the old process was still
running, so /var/icinga/status.dat said it was created by 1.6.1. I killed
the processes and it seems ok now. I guess the /etc/init.d/icinga script
didn't kill off all the old processes, only the one in the .pid file
Maybe a check could be put into the /etc/init.d/icinga to see if there are
any other 'icinga' processes running and notify on say a stop/start etc
On Wed, Nov 7, 2012 at 12:15 PM, Michael Friedrich <
michael.friedr...@gmail.com> wrote:
> On 2012-11-07 18:02, Zachary McGibbon wrote:
>
> I'm having some strange issues where icinga (1.8.1) is saying that it
> can't find the host when external commands come in.
>
> I ran NSCA manually a 4 times and 2 times it failed, any ideas?
>
>
> does the core actually know about that host during the packets being sent?
> is that reflected in objects.cache / status.dat on all states?
>
> which nsca version?
>
>
> [root@logan scripts]# ./submit_nsca_service BELL-mycourses2 "DNS - kona"
> 0 "test 1 2 3"
> 1 data packet(s) sent to host successfully.
> [1352307345] EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;BELL-mycourses2;DNS - kona;-1;test 1 2 3
> [1352307347] PASSIVE SERVICE CHECK: BELL-mycourses2;DNS - kona;3;test 1 2 3
> [1352307347] SERVICE ALERT: BELL-mycourses2;DNS - kona;UNKNOWN;SOFT;1;test
> 1 2 3
>
> [root@logan scripts]# ./submit_nsca_service BELL-mycourses2 "DNS - kona"
> 0 "test 1 2 3"
> 1 data packet(s) sent to host successfully.
> [1352307351] EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;BELL-mycourses2;DNS - kona;-1;test 1 2 3
> [1352307351] Warning: Passive check result was received for service 'DNS
> - kona' on host 'BELL-mycourses2', but the host could not be found!
>
> [root@logan scripts]# ./submit_nsca_service BELL-mycourses2 "DNS - kona"
> 0 "test 1 2 3"
> 1 data packet(s) sent to host successfully.
> [1352307358] EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;BELL-mycourses2;DNS - kona;-1;test 1 2 3
> [1352307358] Warning: Passive check result was received for service 'DNS
> - kona' on host 'BELL-mycourses2', but the host could not be found!
>
> [root@logan scripts]# ./submit_nsca_service BELL-mycourses2 "DNS - kona"
> 0 "test 1 2 3"
> 1 data packet(s) sent to host successfully.
> [1352307362] EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;BELL-mycourses2;DNS - kona;-1;test 1 2 3
> [1352307363] PASSIVE SERVICE CHECK: BELL-mycourses2;DNS - kona;3;test 1 2 3
> [1352307363] SERVICE ALERT: BELL-mycourses2;DNS - kona;UNKNOWN;HARD;2;test
> 1 2 3
>
> This is my script I'm using for submit_nsca_service, modified the
> original /usr/lib64/icinga/eventhandlers/submit_check_result, I read
> somewhere that some people suggest using bash instead of sh for this script
> so I tired that
>
> [root@logan scripts]# more submit_nsca_service
> #!/bin/bash
>
> # Arguments:
> # $1 = host_name (Short name of host that the service is
> # associated with)
> # $2 = svc_description (Description of the service)
> # $3 = state_string (A string representing the status of
> # the given service - "OK", "WARNING", "CRITICAL"
> # or "UNKNOWN")
> # $4 = plugin_output (A text string that should be used
> # as the plugin output for the service checks)
> #
>
> # Convert the state string to the corresponding return code
> return_code=-1
>
> case "$3" in
> OK)
> return_code=0
> ;;
> WARNING)
> return_code=1
> ;;
> CRITICAL)
> return_code=2
> ;;
> UNKNOWN)
> return_code=-1
> ;;
> esac
>
> # pipe the service check info into the send_nsca program, which
> # in turn transmits the data to the nsca daemon on the central
> # monitoring server
>
> # Remove any tabs from output
> output=`echo -e "$4" | tr "\t" " "`
>
> /usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$return_code" "$output" |
> /usr/sbin/send_nsca -H 192.168.0.100 -c /etc/icinga/send_nsca.cfg
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with
> Centralhttp://p.sf.net/sfu/logmein12331_d2d
>
>
>
> _______________________________________________
> icinga-users mailing
> listicinga-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/icinga-users
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-users
>
>
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users