icinga2 on ubuntu 16.04 logs every single api call to /var/log/syslog.
I`m attempting to run icinga2 on xenial (ubuntu 16.04.1). I get a log of api related statements in my syslog. I have some automated integration running every 3 seconds, producing 10+ lines per run.
Dec 16 15:02:43 dev-srv-01 icinga2[763]: [2016-12-16 15:02:41 -0500] information/HttpServerConnection: Request: GET /v1/objects/hosts/xxx?attrs[]=address&attrs[]=vars (root)
Dec 16 15:02:43 dev-srv-01 icinga2[763]: [2016-12-16 15:02:42 -0500] information/ApiListener: New client connection (no client certificate)
Indeed icinga logs actions (apilistener.cpp:403)
Log(LogInformation, "ApiListener") << "New client connection " << conninfo << " (no client certificate)";
How to I configure this log so it is less verbose? I couldn't quite figure it out from the documentation.
This is my configuration so far:
Disabled features: gelf graphite icingastatus mainlog opentsdb perfdata statusdata syslog
Enabled features: api checker command compatlog debuglog ido-mysql livestatus notification
I also create this file: /etc/icinga2/conf.d/api-users.conf
object ApiUser "root" {
password = "x.x"
permissions = [ "objects/*/Host" ]
}
systemd service:
[Unit]
Description=Icinga host/service/network monitoring system
After=postgresql.service mariadb.service carbon-cache.service mysql.service yslog.target
[Service]
Type=simple
ExecStartPre=/usr/lib/icinga2/prepare-dirs /usr/lib/icinga2/icinga2
ExecStart=/usr/sbin/icinga2 daemon -e /var/log/icinga2/error.log
ExecReload=/usr/lib/icinga2/safe-reload /usr/lib/icinga2/icinga2
PIDFile=/run/icinga2/icinga2.pid
[Install]
WantedBy=multi-user.target
The only way to prevent the log statements is to disable feature api, which of course isn't desirable.
I attempted configuring syslog, filelogger, in a .conf file to no avail. Disabling features debuglog, mainlog, also result in spam.
Thank you!