Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include example template + check hook output #31

Merged
merged 9 commits into from
Dec 6, 2019
Merged

Include example template + check hook output #31

merged 9 commits into from
Dec 6, 2019

Conversation

asachs01
Copy link
Contributor

@asachs01 asachs01 commented Sep 5, 2019

This solves for #27 and #30 by providing a workaround in the form of a template + check hook output that can be put into the template body until the plugin is refactored so that hook output and templates aren't mutually exclusive.

This solves for #27 and #30 by providing a workaround in the form of a template + check hook output that can be put into the template body until the plugin is refactored so that hook output and templates aren't mutually exclusive.
@nixwiz
Copy link
Contributor

nixwiz commented Sep 5, 2019

Still needs some format changes. How about this?

Greetings,<br>
<br>
<h3>Informational Details</h3>
<b>Check</b>: {{ .Check.Name }}<br>
<b>Entity</b>: {{ .Entity.Name }}<br>
<b>State</b>: {{ .Check.State }}<br>
<b>Occurrences</b>: {{ .Check.Occurrences }}<br>
<b>Playbook</b>: https://example.com/monitoring/wiki/playbook<br>
<h3>Check Output Details</h3>
<b>Check Output</b>: {{.Check.Output}}<br>
<h4>Check Hook(s)</h4>
{{range .Check.Hooks}}<b>Hook Name</b>:  {{.Name}}<br>
<b>Hook Command</b>:  {{.Command}}<br>
<b>Hook Output</b>: {{.Output}}<br>
{{end}}

<br>
#monitoringlove,<br>
<br>
Sensu<br>
</html>

However, this does bring to light one issue. When using HTML, the formatting of the hook output (or any multi-line string) won't be properly formatted. Here's an example using the template above.

Screen Shot 2019-09-05 at 2 56 42 PM

@asachs01
Copy link
Contributor Author

asachs01 commented Nov 6, 2019

@cwjohnston can I get a 👍 on this?

Copy link
Contributor

@cwjohnston cwjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested some manifest -> definition changes.

Also, it seems like this handler has some command line flags that should be covered in a usage section.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
asachs01 and others added 4 commits November 22, 2019 18:14
Co-Authored-By: Cameron Johnston <cameron@rootdown.net>
Co-Authored-By: Cameron Johnston <cameron@rootdown.net>
Co-Authored-By: Cameron Johnston <cameron@rootdown.net>
Co-Authored-By: Cameron Johnston <cameron@rootdown.net>
@asachs01
Copy link
Contributor Author

asachs01 commented Dec 6, 2019

@cwjohnston can you take a gander again plz?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants