Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /opt/prometheus-monitoring-scripts/lib/python3.10/site-packages/custom_exporters/backups/ |
Upload File : |
#from ..base import BaseExporter from .users import CustomExporter as UsersCustomExporter import json class CustomExporter(UsersCustomExporter): def generate(self): # TODO metric for checking mtime of guests.json with open("/usr/local/dh/etc/localdata/guests.json") as f: self.guests_config = json.load(f) vmhost = self.my_hostname() for guest, gconfig in self.guests_config.items(): if gconfig['status'] == 'up': self.generate_machine(guest, vmhost)