Nagios NPRE: Directory File Count

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagios NPRE: Directory File Count

Post by lamin »

Hey Nscoot,
Do you have any updates or solution for my mssql query issue in nagios?
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Nagios NPRE: Directory File Count

Post by nscott »

Lamin,

Yes, you're query is much more complex than the one I used, but we need to establish a baseline on your system as to why its not working. Also, you're command definition is different than mine and defining the -H option more than once. So if you could duplicate the screenshots I have provided, it would provide a good baseline for troubleshooting this issue.

And no, you don't need to install a Nagios Windows Agent on the SQL server. Since you're able to access the MSSQL database at all means the proper setup has already been accomplished on your SQL server.
Nicholas Scott
Former Nagios employee
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagios NPRE: Directory File Count

Post by lamin »

I have changed the query to a basic one, and the result is shown in nagiosxi interface. So we can say now that the issue was the special characters. Now the questions becomes what do we need to do for those characters in my query.
You do not have the required permissions to view the files attached to this post.
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagios NPRE: Directory File Count

Post by lamin »

NScoot,
Is there any solution for mssql query issue? I have been working on this issue for quite 3 weeks now.

Thanks
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Nagios NPRE: Directory File Count

Post by nscott »

I think the next course of action would be go through and add your query up to the ! special character and see if it returns a value, then add the !, and if thats what breaks it, then we know that won't work and you'll need to add a \ before the !.
Nicholas Scott
Former Nagios employee
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagios NPRE: Directory File Count

Post by lamin »

I got it working now. It was the '!" that nagios does not like. But one more issue is that I not getting the graphs.
By the way, thank you NScott.
You do not have the required permissions to view the files attached to this post.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Nagios NPRE: Directory File Count

Post by nscott »

The problem that arises there is that there is no performance data returned for that service. The plugin would need to edited to return performance data, all that entails is the output of the plugin looking something like this:

OK: Return was $result. | mssql_query_results=$result;;;;;
Nicholas Scott
Former Nagios employee
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagios NPRE: Directory File Count

Post by lamin »

How am I gonna do that. Can you modified the one I have send you so that I can see how you did it?

Thanks
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Nagios NPRE: Directory File Count

Post by nscott »

Take a look at this coe, I edited it on 262 and 292 to give you an idea of what needs to be added.
You do not have the required permissions to view the files attached to this post.
Nicholas Scott
Former Nagios employee
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagios NPRE: Directory File Count

Post by lamin »

is it ready to go or do I have to do additional stuffs?