-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
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
- Run the following command
docker run -d --name graphite --restart=always --network host graphiteapp/graphite-statsd
- Check the UI for Graphite
- Create a cloudstack prefix just to test
echo "cloudstack.force.test 1 $(date +%s)" | nc 127.0.0.1 2003
- Change the global setting parameter "stats.output.uri " to
graphite://192.168.55.152:2003/cloudstack
- 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
- Run influxdb container
docker run -d --name influxdb18 --network host -v influxdb_data:/var/lib/influxdb influxdb:1.8
-
Change the stats.output.uri to "influxdb://192.168.55.152:8086/cloudstack"
-
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
- 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