is it possible to access service states from a command, to pass it as an argument?
I want to use the state from two different services and pass it to a self-written script.
This script is defined as a command in the director.
The script should then define if a host is okay/critical/warning, dependend on the results from the two checks (both okay → okay, one is critical → warning, both critical → ciritical).
The script is working fine so far, only the service states are missing.
Many thanks in advance.
- Director version (System - About): 1.8.1
- Icinga Web 2 version and modules (System - About): 2.9.5
- Icinga 2 version (
icinga2 --version): r2.13.2-1
- Operating System and version: Debian GNU/Linux 11
- Webserver, PHP versions: PHP 7.4.25