Hi ,
I am trying to integrate service now with nagios xi using NRDP and Goal of this integrations is to disable /enable host and service checks from servicenow.
While using NRDP client I cam e to know that it can only submit the passive checks but not external commands.
Is there a way to send external commands to nagiosxi from remote machine using NRDP?
Submit Exernal commands from Remote Machine to Nagioxi
-
mdusanapudi
- Posts: 35
- Joined: Tue Mar 15, 2016 1:31 pm
Re: Submit Exernal commands from Remote Machine to Nagioxi
No, there is not any way to send external commands to Nagios XI from a remote machine using NRDP or via any other component, as far as I'm aware.
For what reasons do you need to suspend host/ service checks on Service now, and under what conditions? Perhaps there is another approach.
For what reasons do you need to suspend host/ service checks on Service now, and under what conditions? Perhaps there is another approach.
Be sure to check out the Knowledgebase for helpful articles and solutions!
-
mdusanapudi
- Posts: 35
- Joined: Tue Mar 15, 2016 1:31 pm
Re: Submit Exernal commands from Remote Machine to Nagioxi
We wanted to put the host check disabled when there is change request in servicenow for maintenance activity.
I am thinking using NRDP if we can pass DISABLE_HOST_CHECK and DISABLE_HOST_SVC_CHECK we can fire them from ServiceNow.
I am thinking using NRDP if we can pass DISABLE_HOST_CHECK and DISABLE_HOST_SVC_CHECK we can fire them from ServiceNow.
Re: Submit Exernal commands from Remote Machine to Nagioxi
There are a couple plugins built already, for ServiceNow integration. I don't know if they all work completely, so they make take some hacking to get them working.
https://exchange.nagios.org/directory/P ... er/details
Instructions can be found here -
http://roshamboot.org/main/deprecated-p ... tegration/
For reference, by setting notification_interval 0 - you will only receive one notification when a host or service goes down.
Will that perl script work for your needs?
https://exchange.nagios.org/directory/P ... er/details
Instructions can be found here -
http://roshamboot.org/main/deprecated-p ... tegration/
For reference, by setting notification_interval 0 - you will only receive one notification when a host or service goes down.
Will that perl script work for your needs?
Former Nagios Employee
-
mdusanapudi
- Posts: 35
- Joined: Tue Mar 15, 2016 1:31 pm
Re: Submit Exernal commands from Remote Machine to Nagioxi
I am actually looking for a way to interact with nagios from a remote machine and not from nagios to servicenow integrationrkennedy wrote:There are a couple plugins built already, for ServiceNow integration. I don't know if they all work completely, so they make take some hacking to get them working.
https://exchange.nagios.org/directory/P ... er/details
Instructions can be found here -
http://roshamboot.org/main/deprecated-p ... tegration/
For reference, by setting notification_interval 0 - you will only receive one notification when a host or service goes down.
Will that perl script work for your needs?
Any API or Script will work for me and I can customize them
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Submit Exernal commands from Remote Machine to Nagioxi
You don't need NRDP for that, you can just issue a curl:mdusanapudi wrote:Is there a way to send external commands to nagiosxi from remote machine using NRDP?
"Scheduling Downtime From A Remote Host"
This is for the host object:
Command:
Code: Select all
curl -d "cmd_typ=55&cmd_mod=2&host=centos03&com_data=TestingDowntime&trigger=0&start_time=03-13-2015 11:30:00&end_time=03-13-2015 11:40:00&fixed=1&childoptions=0&btnSubmit=Commit" "http://xitest/nagios/cgi-bin/cmd.cgi" -u "troylea:password"Command:
Code: Select all
curl -d "cmd_typ=86&cmd_mod=2&host=centos03&com_data=TestingDowntime&trigger=0&start_time=03-13-2015 11:30:00&end_time=03-13-2015 11:40:00&fixed=1&childoptions=0&btnSubmit=Commit" "http://xitest/nagios/cgi-bin/cmd.cgi" -u "troylea:password"Output:
Code: Select all
<P><DIV CLASS='infoMessage'>Your command request was successfully submitted to Nagios for processing.<BR><BR>
Note: It may take a while before the command is actually processed.<BR><BR>http://sites.box293.com/nagios/guides/t ... e-and-cgis
These two URL's also have useful information:
https://old.nagios.org/developerinfo/ex ... ndlist.php
https://github.com/NagiosEnterprises/na ... cmd_list.c
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
mdusanapudi
- Posts: 35
- Joined: Tue Mar 15, 2016 1:31 pm
Re: Submit Exernal commands from Remote Machine to Nagioxi
Thanks Everyone for your replies...I was able to make it work using Ruby.
we need to install a ruby gem called nagios_nrdp
written a ruby script to call the commands
#!/usr/bin/env /usr/local/rvm/rubies/ruby-2.1.0/bin/ruby
require 'nagios_nrdp'
url = ARGV[0]
token = ARGV[1]
command = ARGV[2]
nrdp = Nagios::Nrdp.new(url: url, token: token)
nrdp.submit_command(command)
Run the script with commandline args .URL,token,command
example :send_nrdp.rb http://testurl.com/nrdp mytoken DISABLE_HOST_CHECK;somehost
Thanks
we need to install a ruby gem called nagios_nrdp
written a ruby script to call the commands
#!/usr/bin/env /usr/local/rvm/rubies/ruby-2.1.0/bin/ruby
require 'nagios_nrdp'
url = ARGV[0]
token = ARGV[1]
command = ARGV[2]
nrdp = Nagios::Nrdp.new(url: url, token: token)
nrdp.submit_command(command)
Run the script with commandline args .URL,token,command
example :send_nrdp.rb http://testurl.com/nrdp mytoken DISABLE_HOST_CHECK;somehost
Thanks