upgraded to 5.5.2 - mass remove downtime section not showing
upgraded to 5.5.2 - mass remove downtime section not showing
We recently upgraded nagios XI from 5.4.13 to 5.5.2, and the "mass remove downtime" section no longer displays when going to Home -> Incident Management -> Mass Acknowledge.
Re: upgraded to 5.5.2 - mass remove downtime section not sho
I'm not sure if this is the cause, but the massacknowledge_get_downtimes function has changed in 5.5.2.
this is the function being used in 5.4.13, which works.
function massacknowledge_get_downtimes()
{
$backendargs = array();
$backendargs["cmd"] = "getscheduleddowntime";
$xml = get_backend_xml_data($backendargs);
$downtimes = array();
if ($xml) {
foreach ($xml->scheduleddowntime as $x) {
$downtime_id = "$x->internal_id";
$host_name = "$x->host_name";
$service_description = "$x->service_description";
$scheduled_start_time = "$x->scheduled_start_time";
$scheduled_end_time = "$x->scheduled_end_time";
$duration = "$x->duration";
$downtimes[$host_name][] = array('downtime_id' => $downtime_id, 'host_name' => $host_name, 'service_description' => $service_description, 'scheduled_start_time' => $scheduled_start_time, 'scheduled_end_time' => $scheduled_end_time, 'duration' => $duration);
}
} else echo "can't find host xml!";
return $downtimes;
}
This function is being used in 5.5.2, and the mass remove downtime section isn't displaying.
function massacknowledge_get_downtimes()
{
$dt_arr = get_scheduled_downtime();
$downtimes = array();
if (!empty($arr)) {
foreach ($dt_arr as $dt) {
$downtimes[$host_name][] = array(
"downtime_id" => $dt['internal_downtime_id'],
"host_name" => $dt['host_name'],
"service_description" => $dt['service_description'],
"scheduled_start_time" => $dt['scheduled_start_time'],
"scheduled_end_time" => $dt['scheduled_end_time'],
"duration" => $dt['duration']
);
}
}
return $downtimes;
}
this is the function being used in 5.4.13, which works.
function massacknowledge_get_downtimes()
{
$backendargs = array();
$backendargs["cmd"] = "getscheduleddowntime";
$xml = get_backend_xml_data($backendargs);
$downtimes = array();
if ($xml) {
foreach ($xml->scheduleddowntime as $x) {
$downtime_id = "$x->internal_id";
$host_name = "$x->host_name";
$service_description = "$x->service_description";
$scheduled_start_time = "$x->scheduled_start_time";
$scheduled_end_time = "$x->scheduled_end_time";
$duration = "$x->duration";
$downtimes[$host_name][] = array('downtime_id' => $downtime_id, 'host_name' => $host_name, 'service_description' => $service_description, 'scheduled_start_time' => $scheduled_start_time, 'scheduled_end_time' => $scheduled_end_time, 'duration' => $duration);
}
} else echo "can't find host xml!";
return $downtimes;
}
This function is being used in 5.5.2, and the mass remove downtime section isn't displaying.
function massacknowledge_get_downtimes()
{
$dt_arr = get_scheduled_downtime();
$downtimes = array();
if (!empty($arr)) {
foreach ($dt_arr as $dt) {
$downtimes[$host_name][] = array(
"downtime_id" => $dt['internal_downtime_id'],
"host_name" => $dt['host_name'],
"service_description" => $dt['service_description'],
"scheduled_start_time" => $dt['scheduled_start_time'],
"scheduled_end_time" => $dt['scheduled_end_time'],
"duration" => $dt['duration']
);
}
}
return $downtimes;
}
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: upgraded to 5.5.2 - mass remove downtime section not sho
You can now remove downtime enmasse in
Home -> Incident Management -> Scheduled Downtime
Home -> Incident Management -> Scheduled Downtime
Re: upgraded to 5.5.2 - mass remove downtime section not sho
I saw where it can be done that way, but that's limited to a max of 100 at a time.
Is there a way to do all of them at once, or maybe do 500 at a time?
Is there a way to do all of them at once, or maybe do 500 at a time?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: upgraded to 5.5.2 - mass remove downtime section not sho
Hmm, not at this time, but I can put in a feature request to have the amount of lines changed.jh129666 wrote:I saw where it can be done that way, but that's limited to a max of 100 at a time.
Is there a way to do all of them at once, or maybe do 500 at a time?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: upgraded to 5.5.2 - mass remove downtime section not sho
Talking with the developer this was already planned to be added in the 5.6.0 release.
Re: upgraded to 5.5.2 - mass remove downtime section not sho
Okay, thanks for the info!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: upgraded to 5.5.2 - mass remove downtime section not sho
Locking threadjh129666 wrote:Okay, thanks for the info!