Sensu Go Remediation checks

I have been using sensu core from long time and now migrating to sensu go.
Previously I had some remediation checks in sensu core.
I want to re-write them in sensu go format.
I found out a yaml format for writing the remediation check but I need a json template.
Can someone help me with this?

Hey!

I’m not sure which template you re referring to, but you can always have sensuctl output a json version of an existing check for you for you to edit.

So what i would do in this situation:

  1. Use sensuctl create -f using the yaml file to create the check and
  2. Then use sensuctl check info --format json to have sensuctl generate a json version of the check and save that output to a file.
  3. Edit the json file
  4. Use sensuctl create again to replace it the check resource using the json file.
1 Like

This works for me.

Thanks @jspaleta

Actually…
this might be a great idea for a sensuctl command plugin. We now have the ability to extend sensuctl with contributed command extensions and share them as assets!

So having sensuctl command plugin that can take yaml resources and convert them to json might be very useful contribution from someone.

-jef

So you are saying that it would be better if someone creates a sensuctl plugin which converts yaml to json

I’m not sure its the best approach, its a possible approach.

In reality this is a general enough problem area that people have spun up both online and cmdline tools to do this conversion in the general case.

For example: