Could not compile config files

Wanting to configure Icinga director, I modified the zones.conf file and when I do:

icinga2 daemon -c

This returns me :

critical/icinga-app: Error while parsing command-line options: the required argument for option '--config' is missing

And icinga2 daemon -c /etc/icinga2/icinga.conf
Returns me :

critical/cli: Could not compile config files: Error: Function call 'std::ifstream::open' for file '/etc/icinga2/icinga.conf' failed with error code 2, 'No such file or directory'


        (0) Compiling configuration file '/etc/icinga2/icinga.conf'

I modified this in zones.conf :

object Endpoint "PLC7Cbis" {
  host = ""

object Zone ZoneName {
  endpoints = [ "PLC7Cbis" ]

If you need this:

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

If you are trying to validate the configuration it is -C not -c.

If you are trying to provide the configuration it is /etc/icinga2/icinga2.conf not /etc/icinga2/icinga.conf.

1 Like

Oh yes is better :sweat_smile:
Thank you very much