[icinga-users] External command SCHEDULE_HOST_SVC_DOWNTIME

Michael Friedrich michael.friedrich at univie.ac.at
Mon Feb 20 09:28:24 CET 2012


Daniel.DUFOUR at ec.europa.eu wrote:
>
> Hello Wolfgang,
>
> I’m using latest Icinga 1.6.1 on a RH6 (Running inside a VMWare).
>
> It is not a blocking issue since I have a simple workaround.
>
> [icinga at s-devco-mon ~]# cat /etc/redhat-release
>
> Red Hat Enterprise Linux Server release 6.2 (Santiago)
>
> [icinga at s-devco-mon ~]# uname -a
>
> Linux s-devco-mon.devco.cec.eu.int 2.6.32-131.21.1.el6.x86_64 #1 SMP 
> Fri Nov 11 11:50:54 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
>
> [icinga at s-devco-mon ~]# /usr/local/icinga/bin/icinga --version
>
> Icinga 1.6.1
>
> Copyright (c) 2009-2011 Icinga Development Team (http://www.icinga.org)
>
> Copyright (c) 2009-2011 Nagios Core Development Team and Community 
> Contributors
>
> Copyright (c) 1999-2009 Ethan Galstad
>
> Last Modified: 12-02-2011
>
> License: GPL
>
> [icinga at s-devco-mon ~]# /usr/bin/printf "[%lu] 
> SCHEDULE_HOST_SVC_DOWNTIME;cris_oracle_dev3;%lu;%lu;0;0;60;dufouda;test 1\n" 
> `date +%s` `date --date="2012-02-19 16:30:00" +%s` `date 
> --date="2012-02-19 18:00:00" +%s` > /usr/local/icinga/var/rw/icinga.cmd
>
> [icinga at s-devco-mon ~]# /usr/bin/printf "[%lu] 
> SCHEDULE_HOST_SVC_DOWNTIME;x;cris_oracle_dev3;%lu;%lu;0;0;60;dufouda;test 
> 2\n" `date +%s` `date --date="2012-02-19 16:30:00" +%s` `date 
> --date="2012-02-19 18:00:00" +%s` > /usr/local/icinga/var/rw/icinga.cmd
>
> [icinga at s-devco-mon ~]# tail /usr/local/icinga/var/icinga.log
>
> [1329653371] Auto-save of retention data completed successfully.
>
> [1329653409] EXTERNAL COMMAND: 
> SCHEDULE_HOST_SVC_DOWNTIME;cris_oracle_dev3;1329665400;1329670800;0;0;60;dufouda;test 
> 1
>
> [1329653409] Error: Could not find host '1329665400' provided in 
> external command!
>
> [1329653427] EXTERNAL COMMAND: 
> SCHEDULE_HOST_SVC_DOWNTIME;x;cris_oracle_dev3;1329665400;1329670800;0;0;60;dufouda;test2
>
> Thanks in advance,
>
> Regards,
>
> Daniel Dufour
>
> ------------------------------------------------------------------------
>
> *From:*Wolfgang [mailto:wnd at gmx.net]
> *Sent:* samedi 18 février 2012 22:10
> *To:* icinga-users at lists.sourceforge.net
> *Subject:* Re: [icinga-users] External command SCHEDULE_HOST_SVC_DOWNTIME
>
> So far I'm not able to reproduce your problem. All seems to be just as 
> described in the documentation.
> Please give some details about your environment.
> Which Icinga version do you use? Which os?
>
> Am 12.02.2012 17:20, schrieb Daniel.DUFOUR at ec.europa.eu: 
> <mailto:Daniel.DUFOUR at ec.europa.eu:>
>
> Hello Everybody,
>
> I’m currently making some tests with External command 
> SCHEDULE_HOST_SVC_DOWNTIME
>
> /usr/bin/printf "[%lu] 
> SCHEDULE_HOST_SVC_DOWNTIME;cris_oracle_dev3;1329019200;1329087600;0;0;60;dufouda;Automatic 
> WE Database Refresh\n" `date +%s` > /usr/local/icinga/var/rw/icinga.cmd
>
> The result in log file is
>
> [1329060680] EXTERNAL COMMAND: 
> SCHEDULE_HOST_SVC_DOWNTIME;cris_oracle_dev3;1329019200;1329087600;0;0;60;dufouda;Automatic 
> Database WE Refresh
>
> [1329060680] Error: Could not find host '1329019200' provided in 
> external command!
>
> If I add 1 parameter between SCHEDULE_HOST_SVC_DOWNTIME and HOSTNAME 
> (For example I add “;x;”in second position) Everything is working fine.
>
> /usr/bin/printf "[%lu] 
> SCHEDULE_HOST_SVC_DOWNTIME*;x;*cris_oracle_dev3;1329019200;1329087600;0;0;60;dufouda;Automatic 
> WE Database Refresh\n" `date +%s`> /usr/local/icinga/var/rw/icinga.cmd
>
> The result in log file is
>
> [1329061131] EXTERNAL COMMAND: 
> SCHEDULE_HOST_SVC_DOWNTIME*;x;*cris_oracle_dev3;1329019200;1329087600;0;0;60;dufouda;Automatic 
> Database WE Refresh
>
> [1329061131] SERVICE DOWNTIME ALERT: 
> cris_oracle_dev3;oracle_sessions;STARTED; Service has entered a period 
> of scheduled downtime
>
> [1329061131] SERVICE DOWNTIME ALERT: 
> cris_oracle_dev3;oracle_connect;STARTED; Service has entered a period 
> of scheduled downtime
>
> [1329061131] SERVICE DOWNTIME ALERT: 
> cris_oracle_dev3;oracle_backup;STARTED; Service has entered a period 
> of scheduled downtime
>
> [1329061131] SERVICE DOWNTIME ALERT: 
> cris_oracle_dev3;invalid_objects;STARTED; Service has entered a period 
> of scheduled downtime
>
> [1329061131] SERVICE DOWNTIME ALERT: 
> cris_oracle_dev3;dbms_scheduler;STARTED; Service has entered a period 
> of scheduled downtime
>
> [1329061131] SERVICE DOWNTIME ALERT: 
> cris_oracle_dev3;cris_r6_permissions;STARTED; Service has entered a 
> period of scheduled downtime
>
> According to Icinga 1.6 Documentation, this second parameter should be 
> hostname:
>
> **SCHEDULE_HOST_SVC_DOWNTIME**
>
> |SCHEDULE_HOST_SVC_DOWNTIME;|<host_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
>
> Schedules downtime for all services associated with a particular host. 
> If the "fixed" argument is set to one (1), downtime will start and end 
> at the times specified by the "start" and "end" arguments. Otherwise, 
> downtime will begin between the "start" and "end" times and last for 
> "duration" seconds. The "start" and "end" arguments are specified in 
> time_t format (seconds since the UNIX epoch). The service downtime 
> entries can be triggered by another downtime entry if the "trigger_id" 
> is set to the ID of another scheduled downtime entry. Set the 
> "trigger_id" argument to zero (0) if the downtime for the services 
> should not be triggered by another downtime entry.
>
> Could you help me? Is it a bug? Is it an undocumented parameter?
>

show us your icinga.cfg, especially what you've changed compared to the 
default shipped version. guessing on a bug without posting such 
important information is rather difficult.

> Thanks in advance,
>
> Regards,
>
> *Daniel Dufour*
>
> European Commission, DEVCO
>
> Information Technology and Infrastructure (Unit R6)
> PRODUCTION Team - Head of Section
> Building L41 8/33 - 1049 Brussels, Belgium
> Phone: +32 2 29 55730, Email:daniel.dufour at ec.europa.eu 
> <mailto:Email:daniel.dufour at ec.europa.eu>
>
>
>
> ------------------------------------------------------------------------------
> Virtualization&  Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>
>
> _______________________________________________
> icinga-users mailing list
> icinga-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-users


-- 
DI (FH) Michael Friedrich

Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria

email:  michael.friedrich at univie.ac.at
phone:  +43 1 4277 14359
mobile: +43 664 60277 14359
fax:    +43 1 4277 14338
web:    http://www.univie.ac.at/zid
         http://www.aco.net

Lead Icinga Core Developer
http://www.icinga.org





More information about the icinga-users mailing list