Page 2 of 2

Re: Nagios Webservices

Posted: Tue Sep 03, 2013 8:42 am
by lafargeuser
Is there any document available for nagira installation on Nagios & download link ?

Re: Nagios Webservices

Posted: Tue Sep 03, 2013 9:32 am
by slansing
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.

Re: Nagios Webservices

Posted: Wed Sep 04, 2013 6:38 am
by lafargeuser
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.

Re: Nagios Webservices

Posted: Wed Sep 04, 2013 9:46 am
by abrist
lafargeuser wrote:Or how can I send an alerts in XML formats in forms of Email.
You want the body of the email to be xml, or an attachment? (either way, you would have to create a custom notification)

Re: Nagios Webservices

Posted: Fri Sep 06, 2013 9:06 am
by lafargeuser
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.

Re: Nagios Webservices

Posted: Fri Sep 06, 2013 11:51 am
by abrist
lafargeuser wrote:# only_from = 127.0.0.1
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.
I presume that you restarted xinetd after the changes?

Re: Nagios Webservices

Posted: Tue Sep 10, 2013 7:20 am
by lafargeuser
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”

Re: Nagios Webservices

Posted: Tue Sep 10, 2013 9:56 am
by abrist
Run an nmap on port 6557:

Code: Select all

nmap <ip of XI server> -p 6557

Re: Nagios Webservices

Posted: Wed Sep 18, 2013 6:55 am
by lafargeuser
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

Re: Nagios Webservices

Posted: Wed Sep 18, 2013 10:26 am
by abrist
lafargeuser wrote:But not able to understand below field. because I have to map these field in my tool.
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
This is a lot more than one field. Which ones do you need help with?