Skip to content

stats.output.uri configuration either to Influx Db and Graphite is not working #12604

@kiranchavala

Description

@kiranchavala

problem

stats.output.uri configuration either to Influx Db and Graphite is not working

versions

ACS 4.22 , 4.18

The steps to reproduce the bug

Steps to reproduce the issue

Install docker on server to test Influx and Graphite

Test case with Graphite

  1. Run the following command

docker run -d --name graphite --restart=always --network host graphiteapp/graphite-statsd

  1. Check the UI for Graphite
Image
  1. Create a cloudstack prefix just to test

echo "cloudstack.force.test 1 $(date +%s)" | nc 127.0.0.1 2003

  1. Change the global setting parameter "stats.output.uri " to

graphite://192.168.55.152:2003/cloudstack

  1. Check the mgmt logs
2026-02-06 12:27:33,836 DEBUG [c.c.s.StatsCollector] (StatsCollector-5:[ctx-1e58bf2a]) (logid:136366d3) Sending VmStats of host Host {"id":6,"name":"kvmhost1","type":"Routing","uuid":"650ff5c6-4cf3-4d26-99a8-ce8c0b9b153f"} to graphite host 192.168.55.152:2003
2026-02-06 12:27:33,909 DEBUG [c.c.s.StatsCollector] (StatsCollector-5:[ctx-1e58bf2a]) (logid:136366d3) Sending VmStats of host Host {"id":7,"name":"kvmhost2","type":"Routing","uuid":"c30b8e0d-0a48-40fa-bb57-c2de13513ca5"} to graphite host 192.168.55.152:2003
2026-02-06 12:28:33,965 DEBUG [c.c.s.StatsCollector] (StatsCollector-2:[ctx-70dd39e3]) (logid:e4cdfe41) Sending VmStats of host Host {"id":6,"name":"kvmhost1","type":"Routing","uuid":"650ff5c6-4cf3-4d26-99a8-ce8c0b9b153f"} to graphite host 192.168.55.152:2003
2026-02-06 12:28:34,034 DEBUG [c.c.s.StatsCollector] (StatsCollector-2:[ctx-70dd39e3]) (logid:e4cdfe41) Sending VmStats of host Host {"id":7,"name":"kvmhost2","type":"Routing","uuid":"c30b8e0d-0a48-40fa-bb57-c2de13513ca5"} to graphite host 192.168.55.152:2003
2026-02-06 12:29:34,089 DEBUG [c.c.s.StatsCollector] (StatsCollector-3:[ctx-ea5b7df4]) (logid:8c734224) Sending VmStats of host Host {"id":6,"name":"kvmhost1","type":"Routing","uuid":"650ff5c6-4cf3-4d26-99a8-ce8c0b9b153f"} to graphite host 192.168.55.152:2003
2026-02-06 12:29:34,160 DEBUG [c.c.s.StatsCollector] (StatsCollector-3:[ctx-ea5b7df4]) (logid:8c734224) Sending VmStats of host Host {"id":7,"name":"kvmhost2","type":"Routing","uuid":"c30b8e0d-0a48-40fa-bb57-c2de13513ca5"} to graphite host 192.168.55.152:2003
2026-02-06 12:30:34,218 DEBUG [c.c.s.StatsCollector] (StatsCollector-5:[ctx-a0dfecab]) (logid:d48b8a46) Sending VmStats of host Host {"id":6,"name":"kvmhost1","type":"Routing","uuid":"650ff5c6-4cf3-4d26-99a8-ce8c0b9b153f"} to graphite host 192.168.55.152:2003
2026-02-06 12:30:34,284 DEBUG [c.c.s.StatsCollector] (StatsCollector-5:[ctx-a0dfecab]) (logid:d48b8a46) Sending VmStats of host Host {"id":7,"name":"kvmhost2","type":"Routing","uuid":"c30b8e0d-0a48-40fa-bb57-c2de13513ca5"} to graphite host 192.168.55.152:2003
2026-02-06 12:31:34,350 DEBUG [c.c.s.StatsCollector] (StatsCollector-2:[ctx-7de03f78]) (logid:eea8351f) Sending VmStats of host Host {"id":6,"name":"kvmhost1","type":"Routing","uuid":"650ff5c6-4cf3-4d26-99a8-ce8c0b9b153f"} to graphite host 192.168.55.152:2003
2026-02-06 12:31:34,416 DEBUG [c.c.s.StatsCollector] (StatsCollector-2:[ctx-7de03f78]) (logid:eea8351f) Sending VmStats of host Host {"id":7,"name":"kvmhost2","type":"Routing","uuid":"c30b8e0d-0a48-40fa-bb57-c2de13513ca5"} to graphite host 192.168.55.152:2003
2026-02-06 12:32:34,488 DEBUG [c.c.s.StatsCollector] (StatsCollector-4:[ctx-07ff9180]) (logid:d7d377c2) Sending VmStats of host Host {"id":6,"name":"kvmhost1","type":"Routing","uuid":"650ff5c6-4cf3-4d26-99a8-ce8c0b9b153f"} to graphite host 192.168.55.152:2003
2026-02-06 12:32:34,553 DEBUG [c.c.s.StatsCollector] (StatsCollector-4:[ctx-07ff9180]) (logid:d7d377c2) Sending VmStats of host Host {"id":7,"name":"kvmhost2","type":"Routing","uuid":"c30b8e0d-0a48-40fa-bb57-c2de13513ca5"} to graphite host 192.168.55.152:2003

Test case with Influxdb

  1. Run influxdb container

docker run -d --name influxdb18 --network host -v influxdb_data:/var/lib/influxdb influxdb:1.8

  1. Change the stats.output.uri to "influxdb://192.168.55.152:8086/cloudstack"

  2. Check if the influx db is working

apt install influxdb-client
curl -X POST "http://<>:8086/query?q=CREATE+DATABASE+cloudstack"
curl "http://<>:8086/query?q=SHOW+DATABASES

  1. Check the mgmt logs

Nothing related to influxdb in logs

Ref

https://cwiki.apache.org/confluence/display/CLOUDSTACK/StatsCollector+output+to+Graphite

840c2fd#diff-4964c59e86cff76cb0ed21aaa628e05401cad03389533a13c4887b5d97ce3e2d

https://github.com/apache/cloudstack/blob/main/server/src/main/java/com/cloud/server/StatsCollector.java

#12065

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions