schedule downtime issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

Attempt to schedulle downtime on host amss-onair-kvm-26

As you can see, no trace of this schedulle found in logs.

Here is the trace of nagios log file

Code: Select all

[1455011990] HOST ALERT: onair-tel-ops-img-01b;UP;SOFT;2;OK - onair-tel-ops-img-01b: rta 0.191ms, lost 0%
[1455011990] GLOBAL HOST EVENT HANDLER: onair-tel-ops-img-01b;UP;SOFT;2;xi_host_event_handler
[1455011990] HOST EVENT HANDLER: onair-tel-ops-img-01b;UP;SOFT;2;amos_handler_host
[1455011993] SERVICE ALERT: onair-tel-ops-img-01b;Ping;OK;SOFT;2;OK - onair-tel-ops-img-01b: rta 0.257ms, lost 0%
[1455011993] GLOBAL SERVICE EVENT HANDLER: onair-tel-ops-img-01b;Ping;OK;SOFT;2;xi_service_event_handler
[1455011993] SERVICE EVENT HANDLER: onair-tel-ops-img-01b;Ping;OK;SOFT;2;amos_handler_service
[1455011999] SERVICE ALERT: onair-tel-cf-02;Physical memory;WARNING;HARD;3;Physical memory: 95%used(3764MB/3953MB) (>95%) : WARNING
[1455011999] SERVICE NOTIFICATION: dad;onair-tel-cf-02;Physical memory;WARNING;notify-service-by-email;Physical memory: 95%used(3764MB/3953MB) (>95%) : WARNING
[1455011999] SERVICE NOTIFICATION: opstaff;onair-tel-cf-02;Physical memory;WARNING;notify-service-by-email;Physical memory: 95%used(3764MB/3953MB) (>95%) : WARNING
[1455011999] GLOBAL SERVICE EVENT HANDLER: onair-tel-cf-02;Physical memory;WARNING;HARD;3;xi_service_event_handler
[1455011999] SERVICE EVENT HANDLER: onair-tel-cf-02;Physical memory;WARNING;HARD;3;amos_handler_service
[1455012013] SERVICE ALERT: amsp-onair-nxt-db-12;Replication status for Portal/billing database;CRITICAL;SOFT;1;POSTGRES_HOT_STANDBY_DELAY CRITICAL: DB "portal" (host:amsp-onair-nxt-db-11) 17304
[1455012013] GLOBAL SERVICE EVENT HANDLER: amsp-onair-nxt-db-12;Replication status for Portal/billing database;CRITICAL;SOFT;1;xi_service_event_handler
[1455012013] SERVICE EVENT HANDLER: amsp-onair-nxt-db-12;Replication status for Portal/billing database;CRITICAL;SOFT;1;amos_handler_service
[1455012071] SERVICE ALERT: amsp-onair-nxt-db-12;Replication status for Portal/billing database;OK;SOFT;2;POSTGRES_HOT_STANDBY_DELAY OK: DB "portal" (host:amsp-onair-nxt-db-11) 0
[1455012071] GLOBAL SERVICE EVENT HANDLER: amsp-onair-nxt-db-12;Replication status for Portal/billing database;OK;SOFT;2;xi_service_event_handler
[1455012071] SERVICE EVENT HANDLER: amsp-onair-nxt-db-12;Replication status for Portal/billing database;OK;SOFT;2;amos_handler_service
[1455012291] HOST ALERT: onair-tel-ops-img-01b;DOWN;SOFT;1;CRITICAL - onair-tel-ops-img-01b: Host unreachable @ 10.121.8.59. rta nan, lost 100%
[1455012291] GLOBAL HOST EVENT HANDLER: onair-tel-ops-img-01b;DOWN;SOFT;1;xi_host_event_handler
[1455012291] HOST EVENT HANDLER: onair-tel-ops-img-01b;DOWN;SOFT;1;amos_handler_host
[1455012294] SERVICE ALERT: onair-tel-ops-img-01b;Ping;CRITICAL;SOFT;1;CRITICAL - onair-tel-ops-img-01b: Host unreachable @ 10.121.8.59. rta nan, lost 100%
[1455012294] GLOBAL SERVICE EVENT HANDLER: onair-tel-ops-img-01b;Ping;CRITICAL;SOFT;1;xi_service_event_handler
[1455012294] SERVICE EVENT HANDLER: onair-tel-ops-img-01b;Ping;CRITICAL;SOFT;1;amos_handler_service
[1455012297] SERVICE ALERT: onair-tel-cf-02;Physical memory;OK;HARD;3;Physical memory: 89%used(3531MB/3953MB) (<95%) : OK
[1455012297] SERVICE NOTIFICATION: dad;onair-tel-cf-02;Physical memory;OK;notify-service-by-email;Physical memory: 89%used(3531MB/3953MB) (<95%) : OK
[1455012297] SERVICE NOTIFICATION: opstaff;onair-tel-cf-02;Physical memory;OK;notify-service-by-email;Physical memory: 89%used(3531MB/3953MB) (<95%) : OK
[1455012297] GLOBAL SERVICE EVENT HANDLER: onair-tel-cf-02;Physical memory;OK;HARD;3;xi_service_event_handler
[1455012297] SERVICE EVENT HANDLER: onair-tel-cf-02;Physical memory;OK;HARD;3;amos_handler_service
[1455012308] HOST ALERT: onair-tel-ops-img-01b;DOWN;SOFT;2;CRITICAL - onair-tel-ops-img-01b: Host unreachable @ 10.121.8.59. rta nan, lost 100%
[1455012308] GLOBAL HOST EVENT HANDLER: onair-tel-ops-img-01b;DOWN;SOFT;2;xi_host_event_handler
[1455012308] HOST EVENT HANDLER: onair-tel-ops-img-01b;DOWN;SOFT;2;amos_handler_host
[1455012352] SERVICE ALERT: onair-tel-ops-img-01b;Ping;CRITICAL;SOFT;2;CRITICAL - onair-tel-ops-img-01b: Host unreachable @ 10.121.8.59. rta nan, lost 100%
[1455012352] GLOBAL SERVICE EVENT HANDLER: onair-tel-ops-img-01b;Ping;CRITICAL;SOFT;2;xi_service_event_handler
[1455012352] SERVICE EVENT HANDLER: onair-tel-ops-img-01b;Ping;CRITICAL;SOFT;2;amos_handler_service
[1455012355] HOST ALERT: onair-tel-ops-img-01b;DOWN;SOFT;3;CRITICAL - onair-tel-ops-img-01b: Host unreachable @ 10.121.8.59. rta nan, lost 100%
[1455012355] GLOBAL HOST EVENT HANDLER: onair-tel-ops-img-01b;DOWN;SOFT;3;xi_host_event_handler
[1455012355] HOST EVENT HANDLER: onair-tel-ops-img-01b;DOWN;SOFT;3;amos_handler_host
[1455012355] SERVICE ALERT: amsp-onair-nxt-portal-02;Web Page Content;CRITICAL;SOFT;1;HTTP CRITICAL: HTTP/1.1 200 OK - string 'Your browser' not found on 'http://10.121.9.219:80/confirm_cookies' - 2675 bytes in 0.180 second response time
[1455012355] GLOBAL SERVICE EVENT HANDLER: amsp-onair-nxt-portal-02;Web Page Content;CRITICAL;SOFT;1;xi_service_event_handler
[1455012355] SERVICE EVENT HANDLER: amsp-onair-nxt-portal-02;Web Page Content;CRITICAL;SOFT;1;amos_handler_service
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: schedule downtime issue

Post by ssax »

If you click on your username in the top right corner, what do you have set for Date Format?

Thank you
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

Here is my profile configuration :
account_pref.PNG
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: schedule downtime issue

Post by ssax »

Edit this file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/xicore/downtime.php
After this: (line 662):

Code: Select all

curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
Add this code:

Code: Select all

    curl_setopt($ch, CURLOPT_VERBOSE, true);
    $verbose = fopen('/tmp/curl.out', 'w+');
    curl_setopt($ch, CURLOPT_STDERR, $verbose);
Now try it again and post a sanitized copy of your /tmp/curl.out file.

Thank you
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

Here is the content of trace file :

Code: Select all

* About to connect() to onair-tel-ops-nagxi-01 port 80 (#0)
*   Trying 127.0.0.1... * connected
* Connected to onair-tel-ops-nagxi-01 (127.0.0.1) port 80 (#0)
> POST /nagiosxi/includes/components/nagioscore/ui/cmd.php?username=tsenay&ticket=heaai0ej5h7kl5csmf7nte4vkigi4uekblrsl8fqojcbln8c4c02p4uejftmb99l HTTP/1.1
User-Agent: Nagios XI Curl Request
Host: onair-tel-ops-nagxi-01
Accept: */*
Content-Length: 995
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------3f3f79cabed1

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Date: Fri, 12 Feb 2016 08:17:30 GMT
< Server: Apache/2.2.15 (CentOS)
< X-Powered-By: PHP/5.3.3
< Set-Cookie: nagiosxi=fmos89l82hiqbvt439mm16n5d5; expires=Fri, 12-Feb-2016 08:47:30 GMT; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Content-Length: 1802
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection #0

ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: schedule downtime issue

Post by ssax »

Ok, that looks good, that's were it usually fails.

Add this line:

Code: Select all

file_put_contents('/tmp/curl.out2', $output, FILE_APPEND | LOCK_EX);
After this line in the same location:

Code: Select all

$output = curl_exec($ch);
Then do it again and post the sanitized output of

Code: Select all

/tmp/curl.out2
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

Here is the content :

Code: Select all

<html>
<head>
<link rel="shortcut icon" href="http://onair-tel-ops-nagxi-01/nagiosxi/includes/components/nagioscore/ui/images/favicon.ico" type="image/ico">
<title>
External Command Interface
</title>
<script type='text/javascript' src='http://onair-tel-ops-nagxi-01/nagiosxi/includes/components/nagioscore/ui/js/coreui.js?1449592399'></script>
<script type='text/javascript' src='/nagiosxi/includes/js/jquery/jquery-1.11.2.min.js'></script>
<link rel='stylesheet' type='text/css' href='http://onair-tel-ops-nagxi-01/nagiosxi/includes/components/nagioscore/ui/css/common.css' />
<LINK REL='stylesheet' TYPE='text/css' HREF='http://onair-tel-ops-nagxi-01/nagiosxi/includes/components/nagioscore/ui/css/cmd.css'>
</head>
<body CLASS='cmd'>

<!-- Produced by Nagios (https://www.nagios.org).  Copyright (c) 1999-2007 Ethan Galstad. -->
<table border=0 width=100%>
<tr>
<td align=left valign=top width=33%>
<TABLE CLASS='infoBox' BORDER=1 CELLSPACING=0 CELLPADDING=0>
<TR><TD CLASS='infoBox'>
<DIV CLASS='infoBoxTitle'>External Command Interface</DIV>
Last Updated: Tue Feb 16 13:30:18 UTC 2016<BR>
Nagios® Core™ 4.1.1 - <A HREF='https://www.nagios.org' TARGET='_new' CLASS='homepageURL'>www.nagios.org</A><BR>
Logged in as <i>tsenay</i><BR>
</TD></TR>
</TABLE>
</td>
<td align=center valign=top width=33%>
</td>
<td align=right valign=bottom width=33%>
</td>
</tr>
</table>
<P><DIV CLASS='errorMessage'>Start or end time not valid</DIV></P>
<P><DIV CLASS='errorDescription'>Go <A HREF='javascript:window.history.go(-1)'>back</A> and verify that you entered all required information correctly.<BR>
<A HREF='javascript:window.history.go(-2)'>Return from whence you came</A></DIV></P>

<!-- Produced by Nagios (https://www.nagios.org).  Copyright (c) 1999-2007 Ethan Galstad. -->
</body>
</html>

rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: schedule downtime issue

Post by rkennedy »

At this point, I believe this scheduled downtime bug will be fixed in the next release.

Are you able to schedule in core for the time being until this is released?
Former Nagios Employee
sitaonair
Posts: 55
Joined: Wed Jan 06, 2016 3:36 am

Re: schedule downtime issue

Post by sitaonair »

We already use the schedule downtime within nagios core, so we can wait the next version.
Do you have an idea of the release date ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: schedule downtime issue

Post by rkennedy »

Got it.

It is released now, give the update a try and let us know if this fixes your issue.
Former Nagios Employee
Locked