By_ssh command argument missing in Director

Sorry I searched the forum and found the relevant topic

But still I am posting as the screenshots are in German and I am not that comfortable with icinga to be able to relate. I am sure people like me who are trying to learn icinga on his own will face similar issue and will look for solution

I have some AIX servers which I need to monitor using icinga2. As practice I was planning to do it via ssh.

  1. I have created password less login from my icinga master to the AIX box.
  2. I have copied a script on the AIX box /usr/lib64/nagios/plugin/check_aix_cpu.pl
  3. Went to Icinga Director -> Command -> External Command

image

  1. Looked at the fields there is no command field

Now based on the above link posted @PinkFrog it looks like I am suppose to create a new data field by_ssh_command

Questions
A: I have no clue how to create a data field. Where in director do I go? Some english screenshots will be great.
B: Once that is done I know I have to give the full command path along with variables it takes. For example /usr/lib64/nagios/plugins/check_aix_cpu.pl -c 90 -w 80. Now this will be distributed to a host group with lot of AIX servers. I expect that I should be able to override individual servers threshold if required.
C: I do not want to run these checks from master - but rather from the satellites. Is that possible? Where do I configure that in Director? I am OK to create password less login from both satellites to the AIX box.
D: Not relevant but do we have a list of recommended plugins for AIX?

A: image

B: Check the screenshots from the other thread and fit them to your needs. E.g put /usr/lib64/nagios/plugins/check_aix_cpu.pl -c $by_ssh_crit$ -w $by_ssh_warn$ in your by_ssh_command field and add the by_ssh_warn/crit fields to you service template and put the values in there. You can then override the values for each host in its services tab.
Or you add the by_ssh_warn/crit fields to the host template and set them for each host.

C: If the host, that the check belongs to, is check by the satellite, the check will also be run by the satellite.

1 Like

Thank You very much. It worked. by_ssh_command has to be named as by_ssh_command. I tried with by_ssh_cmd and it was not working for some reason. But Now things work like a charm

Because the by_ssh check command is pre-defined in the ITL and has it specific variables alredy defined.
Check it here: https://your.monitoring.host/icingaweb2/director/commands?type=external_object#!/icingaweb2/director/command/render?name=by_ssh