'Collect VM uptime from openstack cloud

I would like to collect uptime info from a VM provisioned in Redhat Openstack. Is there a native service in OpenStack to continually provide the system logs (with uptime info)? I checked Nova VM diagnostics capability - https://wiki.openstack.org/wiki/Nova_VM_Diagnostics#Overview but i am still trying to figure out if i should have it on an agent on the VM in openstack to provide me the logs or is there any better and elegant way to do it?



Solution 1:[1]

You can use the Gnocchi service for information about server uptime.

Solution 2:[2]

you can use one of these solutions

  • setup ceilometer with seprated rabbit-mq cluster
  • use libvirt exporter (if you are using kvm/qemu) and prometheus.
  • setup custom script and send it to instance via cloud-init (not very good idea if you are not the owner of instance)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SMJ
Solution 2 Aref