Apply rule 'syno-load' 'Service' does not match anywhere!

Hello together,
started today with icinga2 and try to monitor a synology D1815+.
started with a video from https://www.youtube.com/watch?v=cgmUekl-Dk0&t=501s
i´m a complete newbie in incinga2, so sorry for inconvenience :slight_smile:
everything ist up and running but…
i get this error messages from the deamon.
could maybe someone tell me why i could not monitor this service ?

[2020-05-08 18:50:00 +0000] information/cli: Icinga application loader (version: r2.11.3-1)
[2020-05-08 18:50:00 +0000] information/cli: Loading configuration file(s).
[2020-05-08 18:50:00 +0000] information/ConfigItem: Committing config item(s).
[2020-05-08 18:50:00 +0000] information/ApiListener: My API identity: atnez1srx023
[2020-05-08 18:50:00 +0000] warning/ApplyRule: Apply rule ‘syno-load’ (in /etc/icinga2/conf.d/services.conf: 116:1-116:25) for type ‘Service’ does not match anywhere!
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 ScheduledDowntime.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 2 HostGroups.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 FileLogger.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 2 NotificationCommands.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 NotificationComponent.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 13 Notifications.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 2 Hosts.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 Downtime.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 ApiListener.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 3 Zones.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 Endpoint.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 2 ApiUsers.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 235 CheckCommands.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 3 TimePeriods.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 UserGroup.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 1 User.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 13 Services.
[2020-05-08 18:50:00 +0000] information/ConfigItem: Instantiated 3 ServiceGroups.
[2020-05-08 18:50:00 +0000] information/ScriptGlobal: Dumping variables to file ‘/var/cache/icinga2/icinga2.vars’
[2020-05-08 18:50:00 +0000] information/cli: Finished validating the configuration file(s).

Thx 4 Help
Greets from Austria :crazy_face:

Can we see the service object from services.conf? The assign where line is most likely the problem.

Hello Blake,
thx for you´re reply, this is the edited services.conf (more or less the orignial one)

  import "generic-service"

  check_command = "swap"

  assign where host.name == NodeName
}

apply Service "users" {
  import "generic-service"

  check_command = "users"

  assign where host.name == NodeName
}

apply Service "syno-load" {
  import "generic-service"
  check_command = "snmp-load"

  vars.smnp_warn = "2"
  vars.snmp_crit = "4"

  assign where host.vars.os == "DSM"
}

Hi,

could you also post the Host which you want to monitor with the syno-load service?

(please format you code with ``` in the future for better readability. See the FAQ thread for details)

Greetz

Hello Alex,
thx for the advice of formating the text.

the device i want to monitor is a synology nas (synology 1815+)
anything else i could post?

regards mike

1 Like

Hi,

did you created the host object for your synology nas? That would be important because you applied the syno-load service with the assign where rule host.vars.os == "DSM" - so your host object (synology nas) should have this variable set. But you can use any variable you want, take a look at the apply-rules docs.

Greetz also from Austria :smiley: