Giter Club home page Giter Club logo

Comments (6)

cuu508 avatar cuu508 commented on July 18, 2024 1

Potentially yes, but I'd say only if and when end users specifically request it. The Slack integration includes the last ping body with no opt-out option, and there have been no complaints.

from healthchecks.

boopzz avatar boopzz commented on July 18, 2024

I'd like to try and help out and add this in myself as it feels like it should be a fairly quick thing but cant for the life of me find where the values are set. All the vars are fairly common words in the code base like CODE, STATUS, TAGS 😅 . Any pointers to where the current ones are?

from healthchecks.

boopzz avatar boopzz commented on July 18, 2024

I think the functionality is there but not surfaced yet?

<th><code>$BODY</code></th>

from healthchecks.

cuu508 avatar cuu508 commented on July 18, 2024

A $BODY placeholder was implemented in #708.

I'm not sure though how well it would work with Mattermost notifications – $BODY contains raw request body, and if you do something like {"body": "$BODY"}, you would likely run into character escaping issues.

from healthchecks.

cuu508 avatar cuu508 commented on July 18, 2024

Currently, the Slack and Mattermost integrations use the same message template: slack_message.json.

The Slack integration already includes last ping body in the notification (implemented in #735), so the template already supports this. The missing part, to enable it for Mattermost, is in the hc.api.transports.Mattermost class, notify method, fetch the body and pass it as an argument when rendering the template. Here's how the Slack integration does it:

ping = self.last_ping(check)

And the next step would be to test it and see if the last ping body looks OK in Mattermost UIs.

from healthchecks.

boopzz avatar boopzz commented on July 18, 2024

ok cool, might it be worth surfacing a checkbox on the form to say if you want it passed or not? I guess some people would want to send a bunch of logs to the UI but not forced into sending them via the notification

from healthchecks.

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.