How to enable Server Metrics

Part 1: Appliance Level adding Server Metrics

  • Each version will have a different Tag, under the tags tab - https://hub.docker.com/r/iqcloud/metrics-collector

  • Pull server metrics docker from Docker.io.

docker pull registry.cloudsphere.com/metrics-collector:master-131fd729

registry.cloudsphere.com is a proxy for Docker.io . These may be blocked by Firewall

  • vi /opt/docker/appliance-stack.yml

Update the Image 91a9637526db

update Ports - “8080:8080”

Save and exit

click esc > wq > click enter

Ports may not be there to update so add ports highlighted above

metrics-server: image: 91a9637526db restart: always ports: - "8080:8080" volumes: - "/opt/iqas/server/db:/opt/iqas/server/db" - "/opt/iqas/metrics:/opt/iqas/metrics" environment: - JAVA_OPTS=-Xdebug -Dcom.iquate.security.store=jdbc:/opt/iqas/server/db/keychain;AUTO_SERVER=TRUE - metrics.tenantId=${TENANT_ID} - metrics.applianceId=${APPLIANCE_ID} - spring.datasource.url=jdbc:h2:file:/opt/iqas/metrics/data - rabbit.host=rabbitmq-appliance - rabbit.port=5672 - rabbit.user=${RABBIT_APPLIANCE_USER} - rabbit.password=${RABBIT_APPLIANCE_PASSWORD} - HOST_IP_ADDRESS=${HOST_IP_ADDRESS} - LOG_LEVEL=DEBUG - logging.level.com.iquate=DEBUG - logging.level.c.i=DEBUG depends_on: - rabbitmq-appliance
  • Execute this command and wait for the appliance to restart the stack

sudo /opt/docker/stop-appliance-stack.sh true

  • To validate that you are using the right image

docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4a683a41d26e 91a9637526db "sh -c 'java ${JAVA_…" 5 days ago Up 5 days 0.0.0.0:8080->8080/tcp docker_metrics-server_1

 

Part 2: UI Scan Jobs Configuration Update:

Discovery→ Scan Jobs → Configuration →Scan details → Enabling → ServerMetrics

If the ServerMetrics enabling is added :
The metrics collector will be deployed on the target and metrics will be collected every 5 min.



The privilege needed to enable this feature is called PRIV_SCANCONF_SERVER_METRICS.
Contact admin or CloudSphere support to add this privilege to your user account.