- icinga2 - version: r2.14.2-1
- Debian Bookworm
Hi
Icinga2 is running fine, but running into an issue when adding a TrueNAS zone. A check is defined as follows (see CheckCommand below)
This does not work, the plugin using this CheckCommand complains about authorization error.
I am pretty sure this is caused by the dash in the authorization token: 1-UQT1PVtxAfxxx****
For TrueNAS experts, if I replace TrueNAS API token with the admin password, all works fine…but that is not what I want…I don’t want to expose my admin password in Icinga2 conf files…and account has close to root access.
I am also not able to change the TrueNAS API toke (afaik), it is always generated with a “digit dash token” format.
I have tried several ways to escape the dash (backslash, token in single quotes; double dash…)
Any ideas how to make this work with TrueNAS tokens?
object CheckCommand "freenas" {
import "plugin-check-command"
command = [ PluginDir + "/check_truenas_extended_play.py" ]
arguments = {
"-H" = "$freenas_host$"
"-u" = "$freenas_user$"
"-p" = "$freenas_pass$"
"-t" = "$freenas_type$"
"-nv" = ""
}
vars.freenas_host = "$address$"
vars.freenas_user = "admin"
vars.freenas_pass = "1-UQT1PVtxAfxxxxxxxxxxxxxxxxxxxxxxxxx"
vars.freenas_type = "alerts"
}