Monitoring services with wildcard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
RickNWB
Posts: 5
Joined: Fri May 19, 2023 6:41 am

Monitoring services with wildcard

Post by RickNWB »

Hi,

I have a few servers where I want to monitor some services. The problem is that the services will slightly change every 2/3 weeks. Is it possible to use a wildcard as a service? The service name is "Apache_7.7.79" and the next week it is "Apache_7.7.80" so is it possible to use a wildcard like "Apache_7.7.*"

Please let me know.
Rick
Mikasa23
Posts: 7
Joined: Thu Jul 06, 2023 3:12 am

Re: Monitoring services with wildcard

Post by Mikasa23 »

Hi Rick,
Yes, it is possible to use a wildcard in service monitoring to accommodate the changing service names. You can use a wildcard like "Apache_7.7.*" to monitor any service with aio games name starting with "Apache_7.7." followed by any version number.
RickNWB
Posts: 5
Joined: Fri May 19, 2023 6:41 am

Re: Monitoring services with wildcard

Post by RickNWB »

Thank you for your response! Let's try it out
nehakakar
Posts: 9
Joined: Tue Jun 20, 2023 2:10 am

Re: Monitoring services with wildcard

Post by nehakakar »

Yes you can create a service check using a wildcard like "Apache_7.7.*". This will match any service name that starts with "Apache_7.7." and has any value for the version number.
RickNWB
Posts: 5
Joined: Fri May 19, 2023 6:41 am

Re: Monitoring services with wildcard

Post by RickNWB »

I don't get what to do. I tried a few things.

I created a service and I use the check command "check_XI_ncpa" but when I do that, I can't use the wildcard *. When I assign the service to a host, I receive a message that the service is unknown.

Has anyone a link how to do this?
kg2857
Posts: 234
Joined: Wed Apr 12, 2023 5:48 pm

Re: Monitoring services with wildcard

Post by kg2857 »

What happens if you run systemctl httpd status or systemctl and grep -i apache? My syntax could be off so...
RickNWB
Posts: 5
Joined: Fri May 19, 2023 6:41 am

Re: Monitoring services with wildcard

Post by RickNWB »

Do I need to do that in "configure service" and under "monitor the service with this command"? Sorry, I am very new with Nagios
kg2857
Posts: 234
Joined: Wed Apr 12, 2023 5:48 pm

Re: Monitoring services with wildcard

Post by kg2857 »

You run the commands in the shell, such as an ssh session.
Post Reply