Nagios <-> Netcool event handling
Nagios <-> Netcool event handling
Has anyone here attempted (or succeeded) in integrating Nagios and Netcool?
Specifically, I want Nagios to send certain events to Netcool (via SNMP)
and have Netcool ACK the event and send back to Nagios.
The real world reason I want this:
Netcool is a part of our infrastructure and there are people watching
the Netcool board 24/7 (NOC). Nagios is looking at other issues
and we wanted Nagios to send a subset of these issues
to Netcool for escalation and notification purposes.
So, I checked out this site: http://www.robinharwani.net/tag/nagios- ... tegration/
But it only documents half of the conversation: Nagios->Netcool
but not the reverse.
Any help is appreciated.
Specifically, I want Nagios to send certain events to Netcool (via SNMP)
and have Netcool ACK the event and send back to Nagios.
The real world reason I want this:
Netcool is a part of our infrastructure and there are people watching
the Netcool board 24/7 (NOC). Nagios is looking at other issues
and we wanted Nagios to send a subset of these issues
to Netcool for escalation and notification purposes.
So, I checked out this site: http://www.robinharwani.net/tag/nagios- ... tegration/
But it only documents half of the conversation: Nagios->Netcool
but not the reverse.
Any help is appreciated.
Re: Nagios <-> Netcool event handling
The link does look thin on explanation/examples. Have tried contacting the author of the post?
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.
Re: Nagios <-> Netcool event handling
That post is very old. I did email the author but I am not expecting a reply. The blog itself
hasn't been updated in a few years.
-G
hasn't been updated in a few years.
-G
Re: Nagios <-> Netcool event handling
I found the following post in the old archive. He uses nsca on the netcool device to send back commands to the nagios server by way of a dummy host/service. I don't know if this will help, but it is something.
I wish the blog author from your first post got around to making part 2, but alas, even the Mona Lisa is falling apart.
EDIT forgot the link:
https://www.mail-archive.com/nagios-use ... 28699.html
I wish the blog author from your first post got around to making part 2, but alas, even the Mona Lisa is falling apart.
EDIT forgot the link:
https://www.mail-archive.com/nagios-use ... 28699.html
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.
Re: Nagios <-> Netcool event handling
If all else fails, I'll solve this the old fashioned way:
coffee and some long shifts in front of the computer.
When I start talking code in my sleep, I know I'm on the
right track.
BTW, that really does happen with me
So, let's leave this open and I'll update as I make
progress.
Cheers!
coffee and some long shifts in front of the computer.
When I start talking code in my sleep, I know I'm on the
right track.
BTW, that really does happen with me
So, let's leave this open and I'll update as I make
progress.
Cheers!
Re: Nagios <-> Netcool event handling
Great, I am replying to get it off our dashboard. Be kind and don't reply until you have more actionable information 
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.
Re: Nagios <-> Netcool event handling
Well, I have made great progress on this.
There are two more issues left.
Issue 1:
I noticed that the "--serviceeventid=" parameter and the
"--servicestateid=" parameter that is passed to my script,
from nagios, look like unique numbers.
I could combine these two numbers say:
to send netcool a unique number along with the alert.
This way when they ACK back to me
(via a DB row update which netcool would do)
I can trace the ACK back to the issue.
Does this sound like a good approach?
Does the contatenation of serviceeventid and servicestateid
guarantee uniqueness?
Issue 2:
From the command line, how would I ACK a nagios event
and possible add a comment such as:
"This event has been ACked from Netcool"
There are two more issues left.
Issue 1:
I noticed that the "--serviceeventid=" parameter and the
"--servicestateid=" parameter that is passed to my script,
from nagios, look like unique numbers.
I could combine these two numbers say:
Code: Select all
$unique = sprintf "010f%010d", $serviceeventid, $servicestateidThis way when they ACK back to me
(via a DB row update which netcool would do)
I can trace the ACK back to the issue.
Does this sound like a good approach?
Does the contatenation of serviceeventid and servicestateid
guarantee uniqueness?
Issue 2:
From the command line, how would I ACK a nagios event
and possible add a comment such as:
"This event has been ACked from Netcool"
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nagios <-> Netcool event handling
We will have to look into the exact command, but to ack via cli you would want to submit to the nagios.cmd pipe most likely or script a web connection to the local host. As for your values not being passed, you need to add a $ at the end as well, otherwise core will not expand them. Finally, I cannot guarantee that they will make a unique ID, however it is very very likely.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Nagios <-> Netcool event handling
I was only using that statement as a logic example.
I get the variables just fine.
Well, I was using this code (from bash) and I definitely got
a unique ID but I did not want to go overboard. Looks like
I was doing the right thing after all.
And I can pass that number to netcool. This part works like a charm.
Ok, issue 1 is solved then.
Next, is the issue where I want to Acknowledge the event from the command line.
I assume that I have to give Nagios the serviceeventid and/or the serviceproblemid
that corresponds to this alert somehow.
This is that part that I'm missing.
I get the variables just fine.
Well, I was using this code (from bash) and I definitely got
a unique ID but I did not want to go overboard. Looks like
I was doing the right thing after all.
Code: Select all
#
# Create a unique ID
printf -v UNUMBER "%010d%010d%010d" $N_serviceeventid $N_serviceproblemid $(date "+%N")
printf -v LOGLINE "[Service -- %s %16s] HostStatus: %5s-[%d], nSvcStateID: %2d" ${UNUMBER} ${N_host_IP} ${N_hoststate} ${N_hoststate_n} ${N_servicestateid}
echo -e "${LOGLINE}" >>${CMDLOG}
Will give me:
[Service -- 000001376200000000000301840336 10.248.7.180] HostStatus: UP-[0], nSvcStateID: 0
Ok, issue 1 is solved then.
Next, is the issue where I want to Acknowledge the event from the command line.
I assume that I have to give Nagios the serviceeventid and/or the serviceproblemid
that corresponds to this alert somehow.
This is that part that I'm missing.
Re: Nagios <-> Netcool event handling
One more thing: How do I add a comment (from the command line) to a specific alert?
Thanks in advance on this and previous post as it is rather critical.
GKH
Thanks in advance on this and previous post as it is rather critical.
GKH