Change thresholds for Memory warnings for Windows hosts

This forum was archived to /woltlab and is now in read-only mode.
  • Hi Friends,


    I'm reading and working with my new advantage - the Icinga2 book!


    Since I'm monitoring one of our Exchange servers, Icinga2 is monitoring a high RAM load. This is no error but usual since Exchange's STORE.EXE reserves a lot of memory by default.

    That's why I'm trying to change the thresholds of Icinga2's warnings.

    By default, the first warning comes up above 80% load, and it gets critical by 90%.

    I'd like to change this to: warn > 92%, crit > 95%


    What I did in the server's conf-file:

    Code
    1. object Host "ex1.corp.local" {
    2. import "generic-host"
    3. display_name = "ex1.corp.local"
    4. address = "1.2.3.4"
    5. vars.os = "Windows"
    6. vars.nscp_memory.nscp_arguments += [ "warn=load > 95", "crit=load > 98" ]
    7. }

    Icinga receives this update but doesn't work with it. Instead, I can read in the host's overview:

    Quote
    Nscp Memory {
    • nscp_arguments =>
      • warn=load > 95
      • crit=load > 98
    }
    Os Windows

    Looking nice, but not working.


    Dudes, where's my prob?

    Thanks a lot for any step :thumbup:


    ##patrick##

  • Hi.

    Dudes, where's my prob?

    Somewhere in the checkcommand definition the arguments are not preset to the content of the variables, i guess.

    First, do an icinga2 feature enable debuglog and hit the "Check Now" button of your service. do a grep "Running command" /var/log/icinga2/debug.log then. that should show you what command and args icinga2 is running.

    Do not forget to icinga2 feature disable  debuglog again.


    My hostdefinition works for me:

    The post was edited 1 time, last by sru ().

  • Hey sru,

    Thanks a lot. I'll try it this evening.

    What are these credentials for? Seems to me as you're login on to this server.

    Does this match to my win as well?

    I've installed the latest icinga2 client and the nsclient.


    Kind regards und nen schönen Tag nach Berlin!

  • What are these credentials for? Seems to me as you're login on to this server.

    i never used nsclient++, just set it up to help you out (with something i checked to be working )and its windows installer asked me for a password.

    Once chosen, i thought it would be needed at the master, soi consulted the icinga2 doc and found the settings i proposed to you.

    Perhaps of interest: nsclient++ example:

    https://docs.icinga.com/icinga…ent-based-checks-nsclient


    have a nice weekend, also !

  • I'd look onto the debuglog and extract the full command line as sru proposed. Then I'd go onto the Windows client and the NSClient++ config and enable debugging, checking for the actual command arguments being passed. Probably they aren't properly processed.

  • Hi friends,


    this evening, I took some time for testing.

    First, I've enabled debugging to see what exactly is performing the memore diagnostics - and I didn't find any!

    I was searching for a "Running command" in addition with the server's IP or hostname that I'd like to modify. So I wasn't able to find out what's wrong.


    I'd like to give you an overview in how I do the memory check. It's located in my icinga2.conf:

    It's exactly the same as in the book...


    Please, where can I modify or even find out the thresholds, specially for some given hosts?

    Thank you!


    Patrick

  • Hey sru,

    first, thank you. The change may have solved the issue. But, I'm still not happy at all.


    See attached, the values are imported well. The service still is on "warning" state. What else do I have to do?


  • For me it looks like you're service is checking the free memory and not the used memory. Try to set vars.nscp_memory_free explicitly to false.

  • Good morning and thank you for your advice.

    I will test this and report the result again.


    Is there a reference/documentation of all vars.blah_blah ? I'd like to learn more, and asking is not only the best thing.