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.
How to map multiple instances of resources to a service.
Re: How to map multiple instances of resources to a service.
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?
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
Re: How to map multiple instances of resources to a service.
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.
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.
Re: How to map multiple instances of resources to a service.
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
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Thank you
Re: How to map multiple instances of resources to a service.
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?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
Re: How to map multiple instances of resources to a service.
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.
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/
https://www.mcapra.com/