Where to put the definition of a linux service check

This forum was archived to /woltlab and is now in read-only mode.
  • I've tried to Google this and I just can't find a good tutorial / example to use so I'm resigned to asking it here. Hopefully I won't draw too much criticism for asking for an example / fundamental tutorial. I've configured Icinga2 and Icinga2 web with Icinga Director all successfully and have the alerting working out of the box (ping, load, swap etc..). I have several Linux boxes (Centos) and I simply want to setup monitoring for services on those boxes. Each box has Icinga2 installed and reporting back to the master in, what I think, Icinga2 refers to as a "satellite" configuration.

    If I run the following command on the host I want to monitor I get an appropriate response as expected:

    ./check_procs -c 1:1 -a '/usr/lib/hgser/hgser'

    I'm simply trying to make this into a check that reports in to the master as the others do. I've followed some examples and come up with this CheckCommand:

    object CheckCommand "check_my_service"


    import "plugin-check-command"

    command = [ PluginContribDir + "/check_procs" ]

    arguments =


    "-c" = "1:1"

    "-a" = "/usr/lib/hgser/hgser"



    I'm not honestly sure if this is close or way off..

    I've pretty much tried to put that struct into about every file located at /etc/icinga2/conf.d on the box I want to monitor. Every time I put it in a conf file in /etc/icinga2/conf.d Icinga2 won't start, so I remove it. Finally, I put it in commands.conf and Icinga2 started, but I'm not really seeing any sort of check activity occur.

    I fully admit that I'm not expert, but I have read the documentation here:


    But still can't figure it out. I'd really just like a hint / clue or maybe a link to a tutorial or something. My ultimate goal is to just be able to monitor multiple different services on my Linux boxes.

    Thanks in advance

  • Welcome to the forum

    first off a bit more information about your servers would be good.

    What versions of icinga2 do you use ?

    If i understand that right, you have on the boxes you want to monitor, a icinga2 "agent" ?

    Here is some more info about icinga2 agent monitoring:




  • Thanks for the response.. I really appreciate it.

    Everything in my environment (so far) is Centos 7 since it's a lab / POC. Each box has an agent on it, further reading revealed that "satellite" was NOT the correct terminology in this case. I'd like to eventually get it working without an agent using SSH I guess, but right now I'm just shooting for agent based checks. I'm trying to learn, so I'm on a journey.

    All of my agents / master / web are on the latest and greatest version of Icinga2.

    I guess I'd ideally like to get the checks to run on the client agent and then report back to the master, but I'm completely open to suggestions and guidance from the Jedi council which might make the world easier for me in the long run.. In your opinion, if you had no constraints.. what is the ideal configuration given a lab environment ? I really need to monitor running services at this point, outside of the checks that come out of the box already.