Beispiel #1
0
 def get(self):
     dogstatsd_status = DogstatsdStatus.load_latest_status()
     forwarder_status = ForwarderStatus.load_latest_status()
     collector_status = CollectorStatus.load_latest_status()
     self.render(os.path.join(agent_root, "pup", "status.html"),
         port=port,
         platform=platform.platform(),
         agent_version=get_version(),
         python_version=platform.python_version(),
         logger_info=logger_info(),
         dogstatsd=dogstatsd_status.to_dict(),
         forwarder=forwarder_status.to_dict(),
         collector=collector_status.to_dict(),
     )
Beispiel #2
0
 def get(self):
     dogstatsd_status = DogstatsdStatus.load_latest_status()
     forwarder_status = ForwarderStatus.load_latest_status()
     collector_status = CollectorStatus.load_latest_status()
     self.render(
         os.path.join(agent_root, "pup", "status.html"),
         port=port,
         platform=platform.platform(),
         agent_version=get_version(),
         python_version=platform.python_version(),
         logger_info=logger_info(),
         dogstatsd=dogstatsd_status.to_dict(),
         forwarder=forwarder_status.to_dict(),
         collector=collector_status.to_dict(),
     )
Beispiel #3
0
 def latest_status(self):
     try:
         loaded_template = template.Loader(".")
         dogstatsd_status = DogstatsdStatus.load_latest_status()
         forwarder_status = ForwarderStatus.load_latest_status()
         collector_status = CollectorStatus.load_latest_status()
         generated_template = loaded_template.load("status.html").generate(
             port=22,
             platform=platform.platform(),
             agent_version=get_version(),
             python_version=platform.python_version(),
             logger_info=logger_info(),
             dogstatsd=dogstatsd_status.to_dict(),
             forwarder=forwarder_status.to_dict(),
             collector=collector_status.to_dict(),
         )
         return generated_template
     except Exception:
         return "Unable to fetch latest status"
Beispiel #4
0
 def latest_status(self):
     try:
         loaded_template = template.Loader(".")
         dogstatsd_status = DogstatsdStatus.load_latest_status()
         forwarder_status = ForwarderStatus.load_latest_status()
         collector_status = CollectorStatus.load_latest_status()
         generated_template = loaded_template.load("status.html").generate(
             port=22,
             platform=platform.platform(),
             agent_version=get_version(),
             python_version=platform.python_version(),
             logger_info=logger_info(),
             dogstatsd=dogstatsd_status.to_dict(),
             forwarder=forwarder_status.to_dict(),
             collector=collector_status.to_dict(),
         )
         return generated_template
     except Exception:
         return ("Unable to fetch latest status")