How to map multiple instances of resources to a service.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dhillonm
Posts: 3
Joined: Wed Feb 15, 2017 3:30 pm

How to map multiple instances of resources to a service.

Post by dhillonm »

Hi,

I am new to the Nagios world and currently evaluating Nagios XI . One thing I haven't been able to figure out how to map multiple instances of a resource/metric to services. E.g. A target may have 0 to n instances of a db connection pool. i have only seen static mapping of resources, wondering how this is done dynamically as this seems to be a common enough use case.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to map multiple instances of resources to a service.

Post by rkennedy »

Just trying to make sure I understand properly. When you say instances, are you referring to hosts / servers?

It sounds like you may be looking for templates / host groups. This would allow you have a much more dynamic setup that can change with the click of a button, rather then everything manually setup. This would also help largely in environments which are pretty static across the board (with regards to hardware / software).

Take a look at the attached document I wrote a while back, it may help to explain the automating process.

If this wasn't what you're looking for, could you please clarify your question and what you're looking for?
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
dhillonm
Posts: 3
Joined: Wed Feb 15, 2017 3:30 pm

Re: How to map multiple instances of resources to a service.

Post by dhillonm »

Thanks for the quick reply. The resource I am trying to monitor is the JBoss EAP appserver. There are certain metrics which have a one to one mapping with the service definition ( heap usage, thread counts etc. ) and these are easy to map. There are certain resources within the jvm which may have multiple instances e.g. DB Connection pool. So say I want to monitor the max connection pool then for each connection pool instance I have to have a separate service definition.

JVM
| | |
pool1 pool2 pool3
| | |
max conn max conn max conn
| | |
SVC_DB_max_conn_pool1 SVC _DB_max_conn_pool2 SVC_DB_max_conn_pool3
| | |
NAGIOS

Here SVC_DB_max_conn_pool1 is a service definition. Max conn is just one metric, there may be other metrics within the pool. So the challenge is first how to dynamically discover the number of connection pool instances and then create the service definitions. Secondly how to view this data where you are essentially mapping the tree structured data from the jvm to the list form on Nagios.

Not sure if I am looking at this the right way. Appreciate a response.
Thanks.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to map multiple instances of resources to a service.

Post by ssax »

Have you looked over this guide at all to see if it will work for you?

https://assets.nagios.com/downloads/nag ... ios-XI.pdf


Thank you
dhillonm
Posts: 3
Joined: Wed Feb 15, 2017 3:30 pm

Re: How to map multiple instances of resources to a service.

Post by dhillonm »

ssax wrote:Have you looked over this guide at all to see if it will work for you?

https://assets.nagios.com/downloads/nag ... ios-XI.pdf


Thank you
Thanks, I did take a look at the document but it does not answer my question about mapping a service to a variable number of resources. Maybe I just need to dynamically create the service for each occurrence of the resource. Is there an API I can use to achieve this?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How to map multiple instances of resources to a service.

Post by mcapra »

Nagios XI does have a back-end API that could be leveraged to do what you've proposed. You can find documentation under the "Help" section of your Nagios XI GUI.

Other than that, you would need to modify the JMXQuery class (for jmxquery.jar) to account for many-to-one pools. It's only good for one-to-one pools in its current state, though I don't think modifying it to recognize many-to-one pools would be that terribly difficult. If you were looking for custom development for such a feature/plugin, you could contact our sales team and they'd be able to offer some options.
Former Nagios employee
https://www.mcapra.com/
Locked