Wednesday, October 21, 2020

Monitor VMware Cloud Proxy with vROPs Docker Management Pack

 This blog includes the details on how to monitor VMware Cloud Proxy with vROps Docker Management Pack 

Value Add 

It is a Management Pack for collecting performance data from your Docker container platform and providing predictive analysis and real-time information about problems in your infrastructure—all within the vRealize Operations user interface.

System Requirements 

Your system meets the following requirements:

vRealize Operations (vRops) Requirements
Docker Requirements

vRealize Operations 7.x or 8.x

 (Advanced and Enterprise editions)

Docker, versions 17.x+ (Community or Enterprise editions)

ConnectionHostname (or IP address) of vROps system

Hostname (or IP address) of Docker container host

cAdvisor(Container Advisor), versions 0.25.0+ (See: Configuring cAdvisor (Docker))
Note:cAdvisor supports HTTP only.

Default Port: 8080

Install Docker Management Pack

You can refer procedure here to install Management Pack

Configuring cAdvisor (Docker)

Execute following command on the Cloud Proxy 

docker run \
--restart=always \
--privileged=true \
--volume=/cgroup:/cgroup:ro \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--publish=8080:8080 \
--detach=true \
--name=cadvisor \
--cpus=0.25 \
--memory=250M \

Note - Official Documentation doesn't specify any CPU, Memory Configuration but I added the same to ensure it doesn't impact other containers in the RDC. 

Configuring the Management Pack (Docker)

You will need to add Adapter Instance in vROPs 


Log in to vRealize Operations as an admin user and navigate to Administration then

Select Other Cloud Accounts and Click Add Account

Select Docker 

Enter Hostname or IP of the Cloud Proxy and specify a port (Default is 8080)

You can review other details in the documentation. For my setup, I have kept it as Default


Once it finishes data collection then you will see 3 Dashboards populate with Data 

You can also set Notifications. Like here I have configured the notification to notify me on slack when a new container is created 

Saturday, October 10, 2020

Configure Log forwarding from VMware Tanzu Kubernetes Cluster to vRealize Log-Insight

As a personal project, I tested forwarding logs from TKG Cluster to vRealize Log Insight. I would love if anyone is willing to try it and provide feedback

Once the logs are flowing you can create a Dashboard to visualize your TKG environment like the below sample dashboard


The following section includes steps for running vRealize Log Insight Fluentd plugin as a Daemon set

Step 1

 Copy the following files from the shared repo 

  • fluent.conf
  • vrli.yaml

Step 2

Update the fluent.conf file with the given configuration. You only need to update details about the log insight endpoint under the match section. I have tested with 2 configs

Config 1

scheme http

ssl_verify false

port 9000

Config 2

scheme https

ssl_verify false

port 9543

Step 3

Create a ConfigMap in Kubernetes for fluent.conf

kubectl -n kube-system create configmap li-fluentd-config --from-file=fluent.conf

Step 4

Apply the creation/changes of new daemon set configuration to the cluster

kubectl apply -f vrli.yaml

You can verify that pod is successfully running

kubectl get pods --all-namespaces | grep log-collector

Verify Logs 

If everything is successful you can search for logs using “environment contains tanzu_k8s_grid”