How to add new services to be monitored?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

gossamer
Posts: 11
Joined: Wed Mar 08, 2023 4:36 pm

How to add new services to be monitored?

Post by gossamer »

Hi, I'm new to cacti, although I've known about it forever. For background, I've used a combination of nagios and smokeping, so have some familiarity with snmp and mrtg/rrdtool and Linux administration.

I have a number of postfix/dovecot/sqlgrey/amavis mail servers plus a few apache web servers and a mariadb database server that I'd like to monitor. I notice there are "graph templates" for monitoring most apache functions, but nothing for virtually all other services. How do I add new templates? Do I need snmp scripts for each of them, such as to monitor a postfix mailq or, say, number of NOQUEUE entries or all the typical mariadb performance metrics like memory usage, etc?

I've seen tons of articles on the initial cacti install, but not so much about adding common services like postfix and dovecot to be monitored.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

Check out the hostmib and THOLD plugins. There once was a plugin called manage that would create service checks, but it was never migrated to Cacti 1.x.

It's something that though it interests me, is not something I've been specifically focusing on.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
gossamer
Posts: 11
Joined: Wed Mar 08, 2023 4:36 pm

Re: How to add new services to be monitored?

Post by gossamer »

TheWitness wrote: Thu Mar 09, 2023 8:07 am Check out the hostmib and THOLD plugins. There once was a plugin called manage that would create service checks, but it was never migrated to Cacti 1.x.

It's something that though it interests me, is not something I've been specifically focusing on.
Thanks for the tip. I'm trying to install the hmib plugin, and can't find "Cacti's Plugin Management interface" according to the instructions here:
https://github.com/Cacti/plugin_hmib

I've downloaded and extracted it to /var/lib/cacti/scripts/hmib but don't know how to get Cacti to actually see and use it.
gossamer
Posts: 11
Joined: Wed Mar 08, 2023 4:36 pm

Re: How to add new services to be monitored?

Post by gossamer »

gossamer wrote: Thu Mar 09, 2023 5:04 pm
TheWitness wrote: Thu Mar 09, 2023 8:07 am Check out the hostmib and THOLD plugins. There once was a plugin called manage that would create service checks, but it was never migrated to Cacti 1.x.

It's something that though it interests me, is not something I've been specifically focusing on.
Thanks for the tip. I'm trying to install the hmib plugin, and can't find "Cacti's Plugin Management interface" according to the instructions here:
https://github.com/Cacti/plugin_hmib

I've downloaded and extracted it to /var/lib/cacti/scripts/hmib but don't know how to get Cacti to actually see and use it.
Following up with my own question - looks like I should install it in /usr/share/cacti/plugins. Then going to Configuration -> Plugins does detect the plugin.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

Here is an example screenshot of HMIB when it's working. Just a bunch of VM's and lot's of Cacti installs using Net-SNMP + HMIB.
Attachments
HMIBExample.png
HMIBExample.png (255.34 KiB) Viewed 1717 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
gossamer
Posts: 11
Joined: Wed Mar 08, 2023 4:36 pm

Re: How to add new services to be monitored?

Post by gossamer »

TheWitness wrote: Fri Mar 10, 2023 9:22 am Here is an example screenshot of HMIB when it's working. Just a bunch of VM's and lot's of Cacti installs using Net-SNMP + HMIB.
Very helpful, thanks. I now have HMIB installed. Is it necessary to use "new graph" to add a new graph for every service on every host I wish to monitor? Is there some way to just "enable" all five or so net-snmp monitors for all hosts?

After installing it, I still don't see any monitors related to mariadb or dovecot or postfix. What am I missing?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

Either add the devices to Cacti manually using the Net-SNMP Device Template, or use Cacti's automation to automatically detect and add the device by subnet. HMIB, by configuration, will automatically detect these devices and start polling them.

From the HMIB Graph Creation perspective, you first must import the Device Package, and then you can start monitoring the services memory and cpu and creating THOLDs.

Note, depending on how many devices you have, you may have to turn on concurrent processes. Note also that the software inventory collection can take a while, so maybe only run the collector once a day or less.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

Additionally, you can create "Device Types" by the ifDescription regular expression match. Takes a while to figure it out. Make sure you are using SNMP v2 for all devices to speed the data collection as it will use bulk operations.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

This should be your OS Types page out of the box.
Attachments
HMIBDeviceTypes.png
HMIBDeviceTypes.png (335.9 KiB) Viewed 1712 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

The settings page should be pretty self explanatory, at least I hope so.
Attachments
HMIBSettings.png
HMIBSettings.png (301.7 KiB) Viewed 1712 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
gossamer
Posts: 11
Joined: Wed Mar 08, 2023 4:36 pm

Re: How to add new services to be monitored?

Post by gossamer »

TheWitness wrote: Fri Mar 10, 2023 9:47 am The settings page should be pretty self explanatory, at least I hope so.
Okay, I have the HMIB plugin installed, but have no idea of how to actually get it to start creating graphs. This seems to be an unnecessarily complex and seriously involved process of adding new graphs. Currently, the only graphs that exist are the four for localhost.

I have an apache webserver and a mariadb database server. What are the next steps to adding graphs for basic functions like database memory utilization and number of connections to the webserver? I don't see anything related to apache or mariadb or database or webserver or memory or anything related to this in the "New Graph Template" pull-down menu.

I see "Apache HTTP Thread Details %" and similar descriptions under "Graph Template Name", and I've selected them and clicked "Create" but yet no graphs are actually created.

The documentation makes many assumptions about how to do this. The install guide for these plugins seems to leave off after actually installing, and before explaining how to actually create the graphs.

I've enabled "automatically discover cacti devices" and "host MIB poller enabled".

Take the "slowlog" plugin, for example. I've installed successfully, and it's enabled in the "plugins" menu, but now how do I associate it with the database server and have it start plotting that data? There doesn't appear to be any "settings" menu entry available for it.
https://github.com/Cacti/plugin_slowlog
gossamer
Posts: 11
Joined: Wed Mar 08, 2023 4:36 pm

Re: How to add new services to be monitored?

Post by gossamer »

Hi - no one has any tips for me on how to start to produce some graphs for mariadb and dovecot and postfix using HMIB?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

Asking the same question in multiple posts does not make the answer come faster.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: How to add new services to be monitored?

Post by TheWitness »

The data is in the database, but to be honest I don't think I ever created a data query to track the usage on a per host basis. Wrote it over 10 years ago. Someone who knows how to write a data query could fix that easily.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
gossamer
Posts: 11
Joined: Wed Mar 08, 2023 4:36 pm

Re: How to add new services to be monitored?

Post by gossamer »

TheWitness wrote: Mon Mar 13, 2023 6:57 am Asking the same question in multiple posts does not make the answer come faster.
My intent was to ask a more specific question because a significant amount of time passed without an answer at all.
The data is in the database, but to be honest I don't think I ever created a data query to track the usage on a per host basis. Wrote it over 10 years ago.
Okay, then I'm completely misunderstanding how HMIB or perhaps even cacti work.
Why does it appear so difficult to just graph the performance of different services running on a host? Virtually all of the howto articles are limited to just installing it, not actually getting it to do anything useful, and I'm completely stuck.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests