Page 1 of 1

Help with MSSQL Monitoring

Posted: Mon May 03, 2021 11:37 am
by dariopalermo
We need help setting up a correct MSSQL monitoring with Nagios XI.

Is there any specific documentation that explains how to set up the best warning and critical values for a specific MSSQL server?

I know, it's probably a noob question... still we need some help here.

bye, Dario

Re: Help with MSSQL Monitoring

Posted: Mon May 03, 2021 1:43 pm
by vtrac
Hi,
Hope you are having a good day!!
Here's an KB article on "Monitoring Microsoft SQL With Nagios XI":
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

You could also try searching "Nagios Exchange" page (below):
https://exchange.nagios.org/directory/P ... /SQLServer


Best Regards,
Vinh

Re: Help with MSSQL Monitoring

Posted: Mon May 03, 2021 4:16 pm
by dariopalermo
Hi Vinh and thank you for you reply.

I already checked that document, but it clearly states: "Each of the wizards has different metrics that can be measured. The metrics available are clearly explained in the wizards and hence will not be covered here".

Well, that debatable, as the metrics could be clear to undersand (*what* are we metering) but their correct values are not.

an example:

MSSQL Total Pages - CRITICAL: Total pages is 1048576.0

Is that absolutely an issue or it depends on the MSSQL Server configuration?

Bye, Dario

Re: Help with MSSQL Monitoring

Posted: Mon May 03, 2021 4:40 pm
by vtrac
Hi Dario,
Hope you are having a good day.
I'm sorry, but I am not a DBA so I am not quite sure what you are refering as total pages.

However, I think those WARNING and CRITICAL values can be set from the command $ARGx$ field.

Nagios XI GUI > Configure > Core Config Manager > Services
Now, please select the MSSQL service you want to check
Under the "Common Settings" page, you will see "$ARG1$" .... "$ARG2$" ....., It is here that you can set your "W" and "C" value.


Best Regards,
Vinh

Re: Help with MSSQL Monitoring

Posted: Mon May 03, 2021 5:00 pm
by dariopalermo
Hi Vinh,
I'm not a real DBA myself... I know how to set warning and critical values, but I need the correct values to set... the wizard suggested some but my systems are breaching a lot of them.

bye, Dario

Re: Help with MSSQL Monitoring

Posted: Tue May 04, 2021 10:06 am
by vtrac
Hi Dario,
How are you doing?
an example:

MSSQL Total Pages - CRITICAL: Total pages is 1048576.0

Is that absolutely an issue or it depends on the MSSQL Server configuration?
Yes, I believe those "Total Pages" should depends on the MSSQL Server configuration.

Could you please send me the commend its used (to get that Total Pages value)?
Nagios XI GUI > Configure > Core Config Manager > Services
Now, please select the service that give the "Total Pages", then click "Run Check Commend" under the "Common Settings" tab.


Best Regards,
Vinh

Re: Help with MSSQL Monitoring

Posted: Tue May 04, 2021 10:34 am
by dariopalermo
/usr/local/nagios/libexec/check_mssql_server.php -H 10.10.250.203 --checktype 'server' -U 'nagiosxi' -P 'Monitor_2020' --perftype default -p 1433 --mode totalpages --warning 900000 --critical 1000000
CRITICAL: Total pages is 1048576.0|totalpages=1048576.0;900000;1000000;;

900.000 for the warning alert, 1.000.000 for the critical.

bye, Dario

Re: Help with MSSQL Monitoring

Posted: Tue May 04, 2021 3:06 pm
by vtrac
Hi Dario,
Looks like those" --warning 900000 --critical 1000000"are different for each MSSQL server.
Please check with your DBA for the exact values to be used as it is different per server or databases.

Best Regards,
Vinh

Re: Help with MSSQL Monitoring

Posted: Tue May 04, 2021 3:45 pm
by dariopalermo
Hi Vinh,
all you said was perfeclty clear to me in the first place. As our "DB Admin" is not a real, skilled db admin, I don't have anyone to ask. that's why I wrote my post here.

Someone from Nagios should understand the meaning of that indicators and could point me in the right direction...

bye, Dario

Re: Help with MSSQL Monitoring

Posted: Wed May 05, 2021 11:10 am
by vtrac
Hi Dario,
How are you doing?

The problem is there's not really a one-size-fits-all approach to it because one system could have greats specs and another could be horrible.

I checked with my senior team member here and this is what he said:
The defaults we add I think were just a guess based on the system dev was testing against, generally they need to be adjusted to their environment because some will be huge and some will be small, and the specs of each differ when those things become a problem.
It is best to talk to a DBA about this, but since you don't really have one I would suggest that you adjust (increase) the thresholds maybe "-w 1100000 -c 1300000" as a starting point and see how your system performs.


Best Regards,
Vinh