[icinga-users] Can't send external Icinga command

Tomas Macek macek at fortech.cz
Mon Nov 27 12:40:51 CET 2017


Hello, I'm new to Icinga2. I'm upgrading our system from oldish Icinga 
1.7.2 to 2.x (installed on a brand new machine) and I've got a problem 
here with sending external commands to 
Icinga's pipe in /var/run/icinga2/cmd/icinga2.cmd.

I'm getting this error in my message log:

-----
Nov 27 08:27:14 asterisk icingaweb2[27973]: 
Icinga\Module\Monitoring\Exception\CommandTransportException in 
/usr/share/icingaweb2/modules/monitoring/library/Monitoring/Command/Transport/ApiCommandTransport.php:210 
with message: Can't send external Icinga command: 401 Unauthorized. Please 
check your user credentials.
-----

I'm login to the icingaweb by means of my account in apache and it's been 
working fine.

autentication.ini:
-----
[icingaweb2]
strip_username_regexp = ""
backend = "external"

[autologin]
backend = "external"
-----

roles.ini:
-----
[Administrators]
users = "macek"
permissions = "*"
-----

/etc/icinga2/conf.d/api-users.conf
-----
object ApiUser "macek" {
   permissions = [ "*" ]
}
-----

/etc/icinga2/features-enabled/command.conf
-----
library "compat"

object ExternalCommandListener "command" { command_path = 
"/var/run/icinga2/cmd/icinga2.cmd" }
-----

`ll /var/run/icinga2/cmd/icinga2.cmd` output:
-----
prw-rw---- 1 icinga icingacmd 0 Nov 15 09:08 /var/run/icinga2/cmd/icinga2.cmd
-----

`icinga2 feature list` output:
-----
Disabled features: compatlog debuglog gelf graphite influxdb livestatus 
opentsdb perfdata statusdata syslog
Enabled features: api checker command ido-mysql mainlog notification
-----

What am I doing wrong? Can you any any wrong settings? Any hints?

Thanks

Regards, Tomas



More information about the icinga-users mailing list