Call Stored Procedure to setup Alerts

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Lal Prasad
Posts: 3
Joined: Tue Apr 16, 2013 12:02 pm

Call Stored Procedure to setup Alerts

Post by Lal Prasad »

We are trying to find some documentation as to how to call a stored procedure in Nagios to setup alerts. I have been looking for some examples and do not seem to find any. Can you please provide some help.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Call Stored Procedure to setup Alerts

Post by abrist »

All of the possible external commands for the nagios command pipe are listed here. If the command is listed, you should be able to pass them to the command pipe:
http://nagios.sourceforge.net/docs/3_0/extcommands.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.
Lal Prasad
Posts: 3
Joined: Tue Apr 16, 2013 12:02 pm

Re: Call Stored Procedure to setup Alerts

Post by Lal Prasad »

Thanks for your reply. I checked the available commands but there is not one generic which I can use. I have a stored procedure that returns count if more than one tables auto increment key values reach near 80%. I should be able to call this procedure and read the count value which is used in the alert like we can use select count(*) from xyz for setting up the alert. Thanks
Lal Prasad
Posts: 3
Joined: Tue Apr 16, 2013 12:02 pm

Re: Call Stored Procedure to setup Alerts

Post by Lal Prasad »

There is no mention of external commands like stored procedure in the list. I want to call a stored procedure which returns a count like a regular select count(*) from xyz.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Call Stored Procedure to setup Alerts

Post by abrist »

Are you trying to run a query against a database (mssql)? There are a few plugins for that.
http://exchange.nagios.org/index.php?op ... 0procedure
http://exchange.nagios.org/index.php?op ... word=mssql
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.
Locked