Skip to content

Commit

Permalink
Bring internal metrics back (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
berezhinskiy authored Mar 16, 2023
1 parent 36eb1dc commit cddff9e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ecoflow_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ def process_payload(self, params):


def main():

# Disable Process and Platform collectors
for coll in list(REGISTRY._collector_to_names.keys()):
REGISTRY.unregister(coll)

log_level = os.getenv("LOG_LEVEL", "INFO")

match log_level:
Expand Down Expand Up @@ -291,10 +296,6 @@ def main():

metrics = Worker(message_queue, device_name)

# Disable Process and Platform collectors
for coll in list(REGISTRY._collector_to_names.keys()):
REGISTRY.unregister(coll)

start_http_server(exporter_port,)
metrics.loop()

Expand Down

0 comments on commit cddff9e

Please sign in to comment.