We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 697a8d4 + 10e08d8 commit 44526f3Copy full SHA for 44526f3
metrics.sh
@@ -25,3 +25,13 @@ for service in 'compute' 'network'; do
25
echo "${metric}{cloud=\"${OS_CLOUD}\",project=\"${os_project}\",type=\"limit\"} $limit"
26
done
27
28
+
29
30
+metric=openstack_server
31
+echo "# HELP ${metric} OpenStack servers by status"
32
+echo "# TYPE ${metric} gauge"
33
+openstack server list -f value -c Status \
34
+ | uniq -c \
35
+ | while read -r number state; do
36
+ echo "${metric}{cloud=\"${OS_CLOUD}\",project=\"${os_project}\",status=\"${state}\"} $number";
37
+ done
0 commit comments