Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyPOLICY-3886

Grafana docker image: grafana/grafana-oss:8.3.4

Prometheus docker image: prom/prometheus:v2.32.1Node explorer docker image: prom/node-exporter:v1.3


Running as standalone:

Start the policy components on HTTP mode (so no trust/key store). Collect the IPs of applications.

Edit the prometheus configuration YAML file. (update here the file)

Run Prometheus

Code Block
languagebash
docker run -d --name=prometheus --network=host -v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus:v2.32.1

Run grafana

Code Block
languagebash
docker run -d

...

 -

...

-

...

name=grafana grafana/grafana-oss:8.3.4


Navigate to localhost:9090 to check if targets are up and running.

Navigate to localhost:3000 to open grafana. On configurations, add a new data source. Use Prometheus. Inform the localhost:9090 and change to Browser support instead of server.

Save and test to check if Grafana can connect to Prometheus.

Remember to stop/remove containers to run the commands again.


Running with docker-compose:

Clone the docker project.

Run ./csit/start-grafana.sh to start all the policy components (except for clamp) or run ./csit/start-grafana.sh ${component} to start per component. (i.e ./csit/start-grafana.sh pap will start pap and its dependencies only)

Prometheus and Grafana endpoints are shown at the end of script execution. Navigate to ${prometheus}/targets to check if all apps are up and connecting to the service. It takes a few minutes.

Docker compose setup has provisioning of prometheus datasource and two dashboards. As of now, only PAP and API have more detailed stats due to the use of micrometer and actuator. 


Review:

https://gerrit.onap.org/r/c/policy/docker/+/127030   -e "GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource"   grafana/grafana-oss:8.3.4