NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

Monitoring Multiple services #827

Closed melin360 closed 2 years ago

melin360 commented 2 years ago

Hello,

I've configured a service check with multiple services to be checked. Regardles the satus of the service it always shown as OK. Please find below the sytaxis.

define service { host_name DC1 service_description Servicio Multiple check_command check_ncpa!-t 'NoSoloHacking' -P 5693 -M services -q service=VMTools,status=running,service=TapiSrv,status=stopped max_check_attempts 5 check_interval 5 retry_interval 1 check_period 24x7 notification_interval 60 notification_period 24x7 contacts nagiosadmin register 1 }

MrPippin66 commented 2 years ago

You should use a regular expression if you want to match multiple service names (and they all need to be running).

But...you can't group service checks in the same check if you want some to be running and some to not be running.

jomann09 commented 2 years ago

As mentioned above, you cannot use status=running and status=stopped at the same time. Closing this unless there are other issues related to it.