I want to monitor quota level usage for openstack projects and I need to be able to monitor current and max levels for networks, ports and routers (from Python code).
Please note that I am talking about project-level access so the user performing the monitoring is not an open-stack admin.
I was able to successfully read current level and max level for nova metrics (compute) but for those related to neutron (networking) it seems that API and command line returns only max-limits and not current levels.
It very easy to test it yourself:
>openstack limits show --absolute
| totalFloatingIpsUsed | 0 | # broken, real value not 0
| maxTotalFloatingIps | 300 | # correct
...
# no network related limits reported at all
>openstack quota show
| floating-ips | 300 |
| networks | 200 |
| ports | 425 |
| routers | 200 |
| subnets | 200 |
...
# These are the MAX limits, not the current usage levels.
>nova limits
| Name | Used | Max |
+--------------------+-------+--------+
| Cores | 14 | 150 | # correct
| FloatingIps | 0 | 300 | # broken, real value is not 0
| Instances | 3 | 200 | # correct
| Keypairs | - | 100 | # broken, real value is not 0
| RAM | 28672 | 307200 | # correct
# As you c
>neutron quota-list
User does not have admin privileges: Only admin can view or configure quota
I should mention that the web interface (horizon) does already report correctly the Floating IPs. It seems that it does not display any gauges for networks.
The solution should work with openstack kilo
(7) releases or newer.
References
- https://docs.openstack.org/admin-guide/cli-networking-advanced-quotas.html
- datadog monitoring plugin for openstack - that I would like to fix
- collectd openstack plugin - outdated, may try to fix it after datadog one.