Select services to force checks

Discuss new project and feature ideas here.
See labs.nagios.com for new projects under development.

Select services to force checks

Postby fpernet » Mon Apr 23, 2018 2:04 am

Hi All,
I would consider a godd idea if we can from the All Service Problems for instance, to be able to Force an immediate check on all of these problems.
This Button ? could also be usefull on a result window when we select only some services by using the filter field.
This avoid to go from service to service to force the check ...

Thx
fpernet
 
Posts: 51
Joined: Tue Aug 23, 2011 3:40 am

Re: Select services to force checks

Postby kyang » Mon Apr 23, 2018 12:45 pm

Hello,

I don't know if you're using Nagios Core or Nagios XI.

In Nagios XI there is the Mass Acknowledge Component that allows you to scheduled an immediate check in bulk to hosts/services.

https://labs.nagios.com/2014/01/29/usin ... nagios-xi/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1790
Joined: Tue Jul 25, 2017 3:35 pm

Re: Select services to force checks

Postby fpernet » Tue Apr 24, 2018 2:19 am

Hi Kyang,

Thank you. I was speaking about NagiosXI, i should have specified. You're right ... but the goal is to have a button on the filtered services page, or All Service Problems page, in order to be able to refresh the services in one click.
Mass Acknowledge, AFAIK, oblige me to reselect all services i want to refresh...
fpernet
 
Posts: 51
Joined: Tue Aug 23, 2011 3:40 am

Re: Select services to force checks

Postby kyang » Tue Apr 24, 2018 2:02 pm

Thank you for the explanation.

I saw a while back there was a feature request to actually create a component that would allow you to check off each host/service and do specific things instead of finding each host/service.

Some of the examples listed were for "Force an immediate check" and "Disable notifications", of course those were just examples and more could potentially be added if the feature request is implemented.

As for having it on the "All service problems page", I would think it would just tie back into the component i mentioned above.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1790
Joined: Tue Jul 25, 2017 3:35 pm

Re: Select services to force checks

Postby Bryan Quesada » Tue May 08, 2018 11:24 am

With this script you can force the service check and also force all the services of a host.

For example:

Code: Select all
#!/bin/bash
#Develop test: bryan@gridshield.net | Bryan Quesada

command_file=`grep "^command_file=" /etc/nagios/nagios.cfg | cut -d "=" -f 2`

function reschedule() {

stamp=`date +%s`
naghost=$1
service="Retrieve"

#send command

echo "[$stamp] SCHEDULE_FORCED_SVC_CHECK;$naghost;$service;$stamp" >> $command_file
echo "Enviando host:  $naghost servicio: $service "
sleep 1
echo " force the service from host:  $naghost servicio: $service"

}

cont=0
### loop
for host in $*
    do
      if [[ $cont -le $# ]]; then
         #echo $host
         reschedule $host

      fi
        cont=`expr $cont + 1`
   done

#  SEND el RE-SCHEDULE para el host ICA011

##  force all the services of a host

stamp=`date +%s`
host_ica="TEST"

# retry #1
echo " send host: $host_ica "
echo "[$stamp] SCHEDULE_FORCED_HOST_SVC_CHECKS;$host_ica;$stamp" >> $command_file
sleep 5

#  retry #2

stamp=`date +%s`
echo "[$stamp] SCHEDULE_FORCED_HOST_SVC_CHECKS;$host_ica;$stamp" >> $command_file
sleep 1

###### Example execution


./send_commands.sh hostA hostB hostC hostD hostE hostH hostR hostS
Last edited by kyang on Tue May 08, 2018 11:35 am, edited 1 time in total.
Reason: code blocks :)
User avatar
Bryan Quesada
 
Posts: 6
Joined: Wed Nov 05, 2014 10:23 am
Location: Costa Rica

Re: Select services to force checks

Postby kyang » Tue May 08, 2018 11:36 am

Thanks for the help @Bryan Quesada!

@fpernet, take a look at the bash script!

Let us know if you have any more questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1790
Joined: Tue Jul 25, 2017 3:35 pm

Re: Select services to force checks

Postby fpernet » Fri May 11, 2018 3:02 am

Yes thank you @Bryan Quesada!
But as standed my post was to ask for a new feature (request for enhancement). Please take this demand into account for next releases, if you think it is pertinent.
Many thanks everybody for your help and support.
You can close this ticket.
fpernet
 
Posts: 51
Joined: Tue Aug 23, 2011 3:40 am

Re: Select services to force checks

Postby scottwilkerson » Fri May 11, 2018 3:15 pm

@fpernet

Yes. We actually have a feature request already for this to add in functionality to those pages to allow you to take actions in bulk.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9814
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Select services to force checks

Postby JoyYY » Wed Jun 13, 2018 2:36 am

I saw a while back there was a feature request to actually create a component that would allow you to check off each host/service and do specific things instead of finding each host/service.
JoyYY
 
Posts: 1
Joined: Thu Feb 08, 2018 7:50 am

Re: Select services to force checks

Postby scottwilkerson » Wed Jun 13, 2018 8:39 am

JoyYY wrote:I saw a while back there was a feature request to actually create a component that would allow you to check off each host/service and do specific things instead of finding each host/service.


Yes this feature request already exists
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
CTO
 
Posts: 9814
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Ideas

Who is online

Users browsing this forum: No registered users and 4 guests