Giter VIP home page Giter VIP logo

Comments (3)

jhenderson-pro avatar jhenderson-pro commented on May 28, 2024

Resources:

resources.zip

from sensu-go.

c-kruse avatar c-kruse commented on May 28, 2024

Verified that an edge condition where requesting an adhoc execution of a check with proxy_requests configured results in incorrect behavior scheduling. This should be a relatively simple patch to fix.

diff --git a/backend/schedulerd/executor.go b/backend/schedulerd/executor.go
index a6b30570e..0675b4b9c 100644
--- a/backend/schedulerd/executor.go
+++ b/backend/schedulerd/executor.go
@@ -198,7 +198,8 @@ func (a *AdhocRequestExecutor) listenQueue(ctx context.Context) {
                        continue
                }

-               if err = a.processCheck(ctx, &check); err != nil {
+               checkCtx := corev2.SetContextFromResource(ctx, &check)
+               if err = a.processCheck(checkCtx, &check); err != nil {
                        select {
                        case a.listenQueueErr <- err:
                        case <-ctx.Done():

As pointed out in the sensu-engineering slack thread, this use case isn't very obviously useful, and isn't something users are very likely to run into.

from sensu-go.

ManishaKumari295 avatar ManishaKumari295 commented on May 28, 2024

Steps of execution of issue:

  1. Run sensuctl entity list and note the name of your agent entity (typically your hostname).
  2. Edit the provided check.yaml at line 34 to add the entity name. The line should be something like - entity:agentname.
  3. sensuctl create -f ./check.yaml
  4. sensuctl create -f ./proxy.yaml
  5. Wait a little bit and run
    sensuctl event info backend-entity prom-metrics
    and make sure an event is present.
  6. Once the event is present run
    sensuctl check execute prom-metrics
    It should print Issued.
  7. Verify the logs in backend logs , the "no matching entity " error must not be seen inspite the matched entity should be reflected.

from sensu-go.

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.