r/devops • ClickOps • Oct 09 '26

Observability Script output Best Practice Contracts

Hi Devops!

I’m putting together an automation orchestration engine and I want to mature the team by standardizing script output across bash, python, powershell, tofu, etc.

So looking at a JSON output contract that anyone creating a script can adhere to. Then everyone would consume the same format. (The dream right?)

  • Operation name
  • Host
  • Execution status (success, fail, warning, etc)
  • Structured result summary
  • Errors
  • Duration
  • Run ID (UUID)?
  • A schema version (requires a lot of upkeep but can eliminate headaches down the road if maintained. If maintained being key word here lol.)

I’ve been searching around but want to hear from the experts who live in this stuff. Is there any universal or open standard people are using to define these ?

Would rather not build it myself if something people have already settled on.

Thanks for your input.

7 Upvotes

23 comments sorted by

View all comments

2

u/TobZero Oct 09 '26

If you want to look at a very mature design on how to do json output interfaces, have a look at the implementation of  https://github.com/GoogleCloudPlatform/cloud-foundation-fabric

It’s not crossing tools (which I would question a bit if you really want to do it) but the root modules and the reusable modules alle follow the same input/output contract. 

You will need a way to define and test the contract schema. If you don’t, your setup will turn into a complete mess within a few months, if you have multiple teams owning sub sections of your implementation, it will just be weeks without strong schema and testing, before it’s spaghetti code