Nagios Webservices
-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: Nagios Webservices
Is there any document available for nagira installation on Nagios & download link ?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Webservices
None that are specifically from our company. There may be some from the third party tool's site. You would likely need to send the alerts to the tool via a notification handler, or figure out RSS integration with that specific tool.
-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: Nagios Webservices
http://assets.nagios.com/downloads/nagi ... nd_API.pdf
I can use & access the XI backend. Following above link.
But, I dont required Historical data & so much XML Data. Instead,can I get live alerts. Or how can I send an alerts in XML formats in forms of Email.
I can use & access the XI backend. Following above link.
But, I dont required Historical data & so much XML Data. Instead,can I get live alerts. Or how can I send an alerts in XML formats in forms of Email.
Re: Nagios Webservices
You want the body of the email to be xml, or an attachment? (either way, you would have to create a custom notification)lafargeuser wrote:Or how can I send an alerts in XML formats in forms of Email.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: Nagios Webservices
I have installed MK-Livestatus successfully.
& I do get the output after running below command
echo 'GET hosts' | unixcat /var/lib/nagios/rw/live
But now when I write a C or C# code to connect to TCP port 6557, I am not able to establish a connection. It give me a error saying "remote host actively refused connection"
I have also created a file named livestatus in /etc/xinet.d/ directory.
service livestatus
{
type = UNLISTED
port = 6557
socket_type = stream
protocol = tcp
wait = no
# limit to 100 connections per second. Disable 3 secs if above.
cps = 100 3
# set the number of maximum allowed parallel instances of unixcat.
# Please make sure that this values is at least as high as
# the number of threads defined with num_client_threads in
# etc/mk-livestatus/nagios.cfg
instances = 500
# limit the maximum number of simultaneous connections from
# one source IP address
per_source = 250
# Disable TCP delay, makes connection more responsive
flags = NODELAY
user = root
server = /usr/bin/unixcat
server_args = /usr/lib/nagios/mk-livestatus/live
# configure the IP address(es) of your Nagios server here:
# only_from = 127.0.0.1
disable = no
}
Am I missing something ? any help is appreciated.
& I do get the output after running below command
echo 'GET hosts' | unixcat /var/lib/nagios/rw/live
But now when I write a C or C# code to connect to TCP port 6557, I am not able to establish a connection. It give me a error saying "remote host actively refused connection"
I have also created a file named livestatus in /etc/xinet.d/ directory.
service livestatus
{
type = UNLISTED
port = 6557
socket_type = stream
protocol = tcp
wait = no
# limit to 100 connections per second. Disable 3 secs if above.
cps = 100 3
# set the number of maximum allowed parallel instances of unixcat.
# Please make sure that this values is at least as high as
# the number of threads defined with num_client_threads in
# etc/mk-livestatus/nagios.cfg
instances = 500
# limit the maximum number of simultaneous connections from
# one source IP address
per_source = 250
# Disable TCP delay, makes connection more responsive
flags = NODELAY
user = root
server = /usr/bin/unixcat
server_args = /usr/lib/nagios/mk-livestatus/live
# configure the IP address(es) of your Nagios server here:
# only_from = 127.0.0.1
disable = no
}
Am I missing something ? any help is appreciated.
Re: Nagios Webservices
I don't know if this needs to be set or if it will enter a full permissive mode. Try uncommenting it and setting it to the nagios server ip.lafargeuser wrote:# only_from = 127.0.0.1
I presume that you restarted xinetd after the changes?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: Nagios Webservices
Tried that but no luck.
Here problem is, from my 3rd party tool I am trying to call 6557 (port) but not able to due to below error.
“No connection could be made because the target machine actively refused it x.x.x.x:6557”
Here problem is, from my 3rd party tool I am trying to call 6557 (port) but not able to due to below error.
“No connection could be made because the target machine actively refused it x.x.x.x:6557”
Re: Nagios Webservices
Run an nmap on port 6557:
Code: Select all
nmap <ip of XI server> -p 6557Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
lafargeuser
- Posts: 341
- Joined: Thu Sep 27, 2012 12:23 am
Re: Nagios Webservices
I am able to capture Nagios alert information via my code using API method.
But not able to understand below field. because I have to map these field in my tool.
Pls. guide on below information.
INSTANCE_ID SERVICE_ID HOST_ID CURRENT_STATE HAS_BEEN_CHECKED SHOULD_BE_SCHEDULED CURRENT_CHECK_ATTEMPT NO_MORE_NOTIFICATIONS NOTIFICATIONS_ENABLED PROBLEM_ACKNOWLEDGED ACKNOWLEDGEMENT_TYPE CURRENT_NOTIFICATION_NUMBER PASSIVE_CHECKS_ENABLED ACTIVE_CHECKS_ENABLED EVENT_HANDLER_ENABLED FLAP_DETECTION_ENABLED IS_FLAPPING PROCESS_PERFORMANCE_DATA OBSESS_OVER_SERVICE MODIFIED_SERVICE_ATTRIBUTES EVENT_HANDLER NORMAL_CHECK_INTERVAL RETRY_CHECK_INTERVAL CHECK_TIMEPERIOD_ID ID SERVICESTATUSLIST_ID
But not able to understand below field. because I have to map these field in my tool.
Pls. guide on below information.
INSTANCE_ID SERVICE_ID HOST_ID CURRENT_STATE HAS_BEEN_CHECKED SHOULD_BE_SCHEDULED CURRENT_CHECK_ATTEMPT NO_MORE_NOTIFICATIONS NOTIFICATIONS_ENABLED PROBLEM_ACKNOWLEDGED ACKNOWLEDGEMENT_TYPE CURRENT_NOTIFICATION_NUMBER PASSIVE_CHECKS_ENABLED ACTIVE_CHECKS_ENABLED EVENT_HANDLER_ENABLED FLAP_DETECTION_ENABLED IS_FLAPPING PROCESS_PERFORMANCE_DATA OBSESS_OVER_SERVICE MODIFIED_SERVICE_ATTRIBUTES EVENT_HANDLER NORMAL_CHECK_INTERVAL RETRY_CHECK_INTERVAL CHECK_TIMEPERIOD_ID ID SERVICESTATUSLIST_ID
Re: Nagios Webservices
lafargeuser wrote:But not able to understand below field. because I have to map these field in my tool.
This is a lot more than one field. Which ones do you need help with?lafargeuser wrote: INSTANCE_ID SERVICE_ID HOST_ID CURRENT_STATE HAS_BEEN_CHECKED SHOULD_BE_SCHEDULED CURRENT_CHECK_ATTEMPT NO_MORE_NOTIFICATIONS NOTIFICATIONS_ENABLED PROBLEM_ACKNOWLEDGED ACKNOWLEDGEMENT_TYPE CURRENT_NOTIFICATION_NUMBER PASSIVE_CHECKS_ENABLED ACTIVE_CHECKS_ENABLED EVENT_HANDLER_ENABLED FLAP_DETECTION_ENABLED IS_FLAPPING PROCESS_PERFORMANCE_DATA OBSESS_OVER_SERVICE MODIFIED_SERVICE_ATTRIBUTES EVENT_HANDLER NORMAL_CHECK_INTERVAL RETRY_CHECK_INTERVAL CHECK_TIMEPERIOD_ID ID SERVICESTATUSLIST_ID
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.