Not so long ago, VMware released VCSA 6.5, which it recommended to use, instead of the traditional installation of vCenter on the Windows platform. Accordingly, some might have a question, but how to monitor VCSA?
Infa under the cat: How to build and install Zabbix Agent on VCSA + Some information about the device VCSA.
Lyrics:
Someone who has already deployed VCSA 6.5 and tried to look under the hood knows that VMware has now decided to use PhotonOS instead of its “traditional” Suse builds.
If you read the docks to PhotonOS, you can find out what their distribution is RPM based, but they use their own implementation of the package manager tdnf.
')
Conditions:
No one wants to litter the VCSA. VCSA does not use the package manager to control the VCSA components, when installing all the necessary components, to build the zabbix agent there is a chance to break the VCSA and dramatically increase the level of "entropy" inside. Therefore, it must be obtained in this form so that it starts on PhotonOS.
Procedure:
1. You need to install PhotonOS-1.0 Full version, so that there was a pre-installed kit for compiling (gcc, make & etc). To get an ISO image for installation, go to:
vmware.imtqy.com/photon . Find the download link: Photon OS, Version 1.0 - Full ISO ~ 2.4Gb. Download the image.
2. Create a clean VM under PhotonOS in any convenient virtualization environment. Important detail:
!!! root disk on which the installation will be performed should be defined as sda !!!Since the installer from PhotonOS searches for / dev / sda and if it does not find it, it just drops into the console
We actually produce a standard installation (Example:
Off docks )
The installer will ask for the type of system being installed, we simply select “PhotonOS Full”.
We are waiting for the end of the installation and reboot the system.
3. Compile Zabbix Agent.
Open the VM console with PhotonOS and log in. Optionally enable remote login for root in / etc / ssh / sshd_config
→
It is necessary to download the archive with Zabbix source codes→
Direct link to SourceForgeSince In the case of VCSA, remotely throwing data on SSH will not work
(there is your own shell, which requires a separate command to open a normal bash)
Instead of connecting to a VM, we’ll connect to ourselves.
Unpack the archive:
tar -xvf zabbix-3.2.3.tar.gz /tmp/zabbix/
Take data on the VM (commands must be executed on the PhotonOS machine):
scp -r your_user@your_machine:/tmp/zabbix/ /root/zabbix/
Taking the source code, it remains to do:
After the compilation is complete, you will get a binary that will work on VCSA:
./src/zabbix_agent/zabbix_agentd - the binary itself
./conf/zabbix_agentd.conf - config to the binary, which usually lies in /etc/zabbix/zabbix_agentd.conf
VCSA uses systemd as init, so a service will be needed for the Zabbix Agent operation, an example of a service:
# /etc/systemd/system/zabbix-agent.service [Unit] Description=Zabbix Agent Documentation=man:zabbix_agentd After=network.target [Service] Type=simple ExecStart=/usr/sbin/zabbix_agentd -f -c /etc/zabbix/zabbix_agentd.conf Restart=always RestartSec=5s [Install] WantedBy=multi-user.target
We move necessary from VM:
4. Install Zabbix Agent on VCSA. Connecting via ssh to VCSA, an input prompt will appear, enter the shell to get access to the Linux console.
PS An example list of services that can be monitoredvmware-vpxd
OS
vmware-vpostgres
vsphere-client
vsphere-ui
vmware-vpxd-svcs
vmware-sps
vmware-stsd
vmware-perfcharts
vmware-content-library
vmware-sts-idmd
vmware-updatemgr
vmware-psc-client
vmware-cm
vmware-vapi-endpoint
applmgmt
vmcad
vmware-eam
vmware-cis-license
vmware-vsm
vmware-mbcs
vmware-sca
vmware-vsan-health
vmware-rbd-watchdog
vmware-imagebuilder
vmware-rhttpproxy
vcha
vmafdd
vmdird
vmdnsd
vmware-netdumper
vmonapi
vmware-statsmonitor
vmware-vmon
Script for monitoring vmware services
PSS Like I forgot nothing