nagios-http-json icon indicating copy to clipboard operation
nagios-http-json copied to clipboard

Enhanced plugin output without critical information

Open K0nne opened this issue 1 year ago • 6 comments

Hello,

is it possible to add a switch to enhance the plugin output with the pprint'ed json object? I know this is already part of the debug switch, but we cant use -d, because we need to hide the used credentials, which are part of the -d output.

K0nne avatar Mar 14 '24 12:03 K0nne

Hi, we can have a look at it.

Maybe it makes sense to hide credentials during the debug output. Would that cover your use case?

martialblog avatar Mar 14 '24 13:03 martialblog

We have tested a few scenarios. The used credentials can also be part of the header. I think its much safer to have a switch, which only shows the detailed json object.

K0nne avatar Mar 15 '24 08:03 K0nne

Been thinking about this.

Since the --debug flag is boolean and meant for development or error debugging, it should print out all information to help with these tasks.

However, we could introduce a -v flag to increase the verbosity of the output. This flag could be used multiple times -vv -v to further increase the output. This would allow us to be more flexible in the future when we need to print out things that are valuable but not essential for debugging.

martialblog avatar Mar 19 '24 07:03 martialblog

Sounds good 👍🏻

K0nne avatar Mar 19 '24 15:03 K0nne

Implemented this feature here: https://github.com/drewkerrigan/nagios-http-json/pull/86

martialblog avatar Apr 09 '24 12:04 martialblog

@K0nne Does this cover the use case?

martialblog avatar Apr 09 '24 13:04 martialblog

It works perfect :) Big sorry for the delay!

K0nne avatar May 14 '24 08:05 K0nne