Monitoring custom windows services

Hi everybody,

im new into icnga2 and im kind of confused right now, so I hope, anybody can help me with my question.
Im running a icinga env with one windows server (agent) and one ubuntu server (agent). The icinga master is running a ubuntu server (see more informations below).

Im trying to monitor multiple windows services on my windows machine.
But I didnt found any working solution yet.

Can you help me finding a solution to monitor custom windows services?

Thank you very much.

SyS Informations:
System information:
Platform: Ubuntu
Platform version: 22.04.2 LTS (Jammy Jellyfish)
Kernel: Linux
Kernel version: 5.15.0-1034-azure
Architecture: x86_64

Build information:
Compiler: GNU 11.3.0
Build host: runner-hh8q3bz2-project-575-concurrent-0
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022

Application information:

General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2

Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var

Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid

Features:
Disabled features: command compatlog debuglog elasticsearch gelf graphite influxdb influxdb2 livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker icingadb ido-mysql mainlog notification
root@f16weup001COPYUbuntuTest:/etc/icinga2/features-available# icinga2 featuredisable enable list

Config Validation:
[2023-04-05 12:02:01 +0000] information/cli: Icinga application loader (version: r2.13.7-1)
[2023-04-05 12:02:01 +0000] information/cli: Loading configuration file(s).
[2023-04-05 12:02:01 +0000] information/ConfigItem: Committing config item(s).
[2023-04-05 12:02:01 +0000] information/ApiListener: My API identity: f16weup001COPYUbuntuTest
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 13 Notifications.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 2 HostGroups.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 2 Hosts.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 FileLogger.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 Downtime.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 IcingaDB.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 3 Zones.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 Endpoint.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 2 ApiUsers.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 ApiListener.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 NotificationComponent.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 244 CheckCommands.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 UserGroup.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 3 ServiceGroups.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 2 TimePeriods.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 User.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 1 ScheduledDowntime.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 15 Services.
[2023-04-05 12:02:01 +0000] information/ConfigItem: Instantiated 2 NotificationCommands.
[2023-04-05 12:02:01 +0000] information/ScriptGlobal: Dumping variables to file ‘/var/cache/icinga2/icinga2.vars’
[2023-04-05 12:02:01 +0000] information/cli: Finished validating the configuration file(s).

How do you write your configurations?

  1. icinga director
  2. puppet/ansible
  3. by hand

Hi!
I write my conf’s via. hand using vi/vim.

I use this monitoring-plugins/check-plugins/service at main · Linuxfabrik/monitoring-plugins · GitHub check to minitor windows services.

Out of the box you can use the windows commands defined in the ITL after you installed the agent on the server:
https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#windows-plugins-for-icinga-2

Add the windows host as an agent to your configuration (needs the host, endpoint and zone object), create service templates using the mentioned commands and then apply some checks.

1 Like