GithubHelp home page GithubHelp logo

Comments (3)

rbarry82 avatar rbarry82 commented on June 10, 2024

We don't do this with loki_push_api, but Loki pushes batch, and wait in the queue until it actually is available (so in theory, waiting for a bit doesn't actually cause lost logging data, just delayed logging data). AFAIK, remote-write does not, and may cause Prometheus to complain about out of order timestamps even if it did, so waiting is not ok

from grafana-agent-k8s-operator.

sed-i avatar sed-i commented on June 10, 2024

According to both docstrings and the doc page, "waiting" means the charm is healthy, and "blocked" - unhealthy.

I think "waiting" is correct here.


Doc page:

Status Meaning
waiting The charm is alive and well, and is waiting for some event to occur. No human intervention required.
blocked The charm is stuck. Human attention/intervention is required.

Docstring for WaitingStatus:

    The unit is unable to progress to an active state because an application to which
    it is related is not running.

Docstring for BlockedStatus:

    An operator has to manually intervene to unblock the unit and let it proceed.

    def _update_status(self):
        """Determine the charm status based on relation health and grafana-agent service readiness.

        Sets unit status to either Waiting or Active.
        """
        if relations := self.model.relations.get("metrics-endpoint"):
            if len(relations):
                if not len(self.model.relations[REMOTE_WRITE_RELATION_NAME]):
                    self.unit.status = WaitingStatus("no related Prometheus remote-write")
                    return

        if not self.is_ready:
            self.unit.status = WaitingStatus("waiting for the agent to start")
            return

        self.unit.status = ActiveStatus()

from grafana-agent-k8s-operator.

sed-i avatar sed-i commented on June 10, 2024

Fixed in #141.

from grafana-agent-k8s-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.