Skip to content

Be more explicit with API endpoint #3

@jurgenhaas

Description

@jurgenhaas

Currently, when the Netdata object gets instantiated, the endpoint gets determined as either _ALL_METRIC_ENDPOINT or _ALARMS_ENDPOINT or _DATA_ENDPOINT which causes an issue when you use this package to integrate for multi-purpose environments.

I'm currently working on the improvement of the Home-Assistant integration (home-assistant/core/pull/34339) and there we collect both metric data and alarms but want to deal with one Netdata instance for each host only.

It would be very helpful if you could change the 3 functions in the Netdata class such that they always defined their required endpoint, i.e.

  • get_allmetrics() should call self.endpoint = _ALL_METRIC_ENDPOINT
  • get_alarms() should call self.endpoint = _ALARMS_ENDPOINT
  • get_data() should call self.endpoint = _DATA_ENDPOINT

If you accepted this proposal, I'm happy to provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy