Jumat, 26 November 2021

CHECKMK-enable snmp vcent

 

I started to run a Cacti server in my Homelab just for fun and to have an overview of some key metrics of the virtual machines, servers, switches, storage and any other SNMP capable piece of kit at home.

However, over the years made me learning some things whenever some special configuration was needed or some more when you would need create your own data collectors and dependencies.

So at the moment it is monitoring 35 devices.

But let’s get back to the topic of the post.

https://vrandombites.co.uk/vcenter/vcenter-setting-up-vcenter-appliance-snmp-monitoring/

Setting up SNMP monitoring in VMware vCenter AppliancePermalink

Connect via SSH to vCenterPermalink

The configuration will be done through the vCenter Appliance Shell.

To get to the shell you will need to SSH to the vCenter Appliance, to be able to run a couple of shell commands.

Connect to vCenter via SSH

In case you login directly to BASH shell you can re-activate the Appliance shell again with the following

chsh -s /bin/appliancesh root

More detailed info in KB 2100508 - Toggling the vCenter Server Appliance 6.x default shell

Check the initial statePermalink

You can check the vCenter SNMP initial configuration using snmp.get command on the Appliance Shell

Check vCenter SNMP initial config

Setting it upPermalink

We will setup a basic configuration to be able to use SNMP v2 and a community string. The shell commands to use will be:

  • Setup SNMP v2 community string

    snmp.set --communities <community string>
    
  • Setup contact info

    snmp.set --syscontact <user contact>
    
  • Setup a location name/id

    snmp.set --syslocation <location name/id>
    

    Setup vCenter SNMP

Last step - Enabling itPermalink

To enable it we need to run snmp.enable in the Appliance shell.

Enable vCenter SNMP service

Checking if our setup worksPermalink

Testing with a snmpwalk command line utility.

SNMP walk test

Checking our Cacti server

Cacti Check - CPU

Cacti Check - Ethernet and Used Space

It seems that all is good to go and my Cacti server is now showing some pretty graphs.

Tidak ada komentar:

Posting Komentar