Monitoring Proxmox EV with Centreon

It's about time to monitor our Proxmox VE servers, Today it is time to see the possibilities we have to monitor these hypervisors from the monitoring software par excellence, Centreon. We'll look at how to get the metrics of your performances, statuses of your virtual machines or storage among others.

Many organizations have been working with Proxmox for a long time, but perhaps in recent years, thanks to VMware, is becoming more visible every day, in the blog we will try to bring some documents that can provide you to all of you who have Proxmox implanted, or maybe you want to discover some of its wonders. In this post we will see how to monitor our Proxmox VE servers, with the aim of knowing at all times its availability and performance; as we always will with Centreon.

To be able to access data from our Proxmox hypervisors, Have 2 options, one via SNMP and one via API. The first, SNMP, being a Debian-based Linux distribution, we proceed to install it as we would usually do in any Debian, therefore, Typical server resources, CPU, RAM, Disks, Net, Processes… we would get them as if we were dealing with any Linux, by associating the Linux OS Template we would already have them. And the second option, Well, by default Proxmox already has its API enabled to be able to work and make queries safely.

Like many times, Today we are once again going to rely on the project of Centreon Plugins, which as you know is a suit that they give us to be able to monitor many things. If it doesn't ring a bell, here We talk about its possibilities. Well, Well, with this script that Centreon gives us, we can add a plugin called 'apps::Next Mox::see::Restapi::Plugin’ and monitor interesting things to our hypervisor. With it, we will be able to know the status and performance of the node and virtual machines, as well as the use of our storages..

I leave you if you are okay with the 3 Commands I use, to monitor node status:

perl $CENTREONPLUGINS$/centreon-plugins/src/centreon_plugins.pl --plugin=apps::Next Mox::see::Restapi::plugin --mode=node-usage --hostname=$HOSTADDRESS$ --api-username=$ARG1$ --api-password='$ARG2$' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --warning-cpu=$ARG 3$ --warning-memory=$ARG 4$ --warning-swap=$ARG 5$ --warning-fs=$ARG 6$ --critical-cpu=$ARG 7$ --critical-memory=$ARG 8$ --critical-swap=$ARG 9$ --critical-fs=$ARG 10$

With the following arguments:

  • ARG1 : API User
  • ARG2 : API Password
  • ARG3 : Warning CPU %
  • ARG4 : Warning Memory %
  • ARG5 : Warning Swap %
  • ARG6 : Warning FileSystem %
  • ARG7 : Critical CPU %
  • ARG8 : Critical Memory %
  • ARG9 : Critical Swap %
  • ARG10 : Critical FileSystem %

To monitor the health of your virtual machines:

perl $CENTREONPLUGINS$/centreon-plugins/src/centreon_plugins.pl --plugin=apps::Next Mox::see::Restapi::plugin --mode=vm-usage --hostname=$HOSTADDRESS$ --api-username=$ARG1$ --api-password='$ARG2$' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --vm-name='$ARG3$' --warning-cpu=$ARG4$ --warning-memory=$ARG5$ --warning-swap=$ARG6$ --critical-cpu=$ARG7$ --critical-memory=$ARG8$ --critical-swap=$ARG9$

With the following arguments:

  • ARG1 : API User
  • ARG2 : API Password
  • ARG3 : Name MV
  • ARG4 : Warning CPU %
  • ARG5 : Warning Memory %
  • ARG6 : Warning Swap %
  • ARG7 : Critical CPU %
  • ARG8 : Critical Memory %
  • ARG9 : Critical Swap %

And to monitor storage:

perl $CENTREONPLUGINS$/centreon-plugins/src/centreon_plugins.pl --plugin=apps::Next Mox::see::Restapi::plugin --mode=storage-usage --hostname=$HOSTADDRESS$ --api-username=$ARG1$ --api-password='$ARG2$' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --storage-name='$ARG3$'  --warning-storage=$ARG4$ --critical-storage=$ARG5$

With the following arguments:

  • ARG1 : API User
  • ARG2 : API Password
  • ARG3 : Name Storage
  • ARG4 : Warning %
  • ARG5 : Critical %

To then create the Services we need, one will be the State of the node, others will be to know the health of each VC, as well as its performance and resource usage; and finally we will create as many Services as we have different storages.

After recording and exporting as always, we would already have our first Proxmox VE hypervisor monitored!

As I always tell you and I know I'm a firecracker, If it helps someone I am satisfied. You've seen that it's an easy way to monitor a Proxmox server, first we will treat you like any other Linux computer to have the most common services, and then with the Centreon Plugins script we will be able to obtain more specific data from the machine. Come on, we're all late, A hug, May it go very well for you!

Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!

Your own IT News

10 de October de 2024

RustDesk and RustDesk Web Client

17 de October de 2024