Skip to content

Support parseable output, e.g. JSON #302

Open
martinvonwittich opened this issue Jun 30, 2021 · 2 comments
Open

Support parseable output, e.g. JSON #302

martinvonwittich opened this issue Jun 30, 2021 · 2 comments

Comments

@martinvonwittich
Copy link

I want to use ipmitool in a Perl script to identify BMCs with an unsafe default configuration (network access enabled) on customer servers. The correct way to do this seems to be to enumerate the channels (ipmitool channel info 0..15), identify which of them are network channels, and then to query them with ipmitool lan print <channel>.

Unfortunately, ipmitool does not seem to feature parseable output, which means I have to parse the human-readable output. Doing that properly is rather hard and prone to breakage, so a proper parseable output format like JSON would be appreciated.

@AlexanderAmelkin
Copy link
Contributor

AlexanderAmelkin commented Jun 30, 2021

ipmitool does not support JSON output, but it supports CSV output (the -c option).
Unfortunately, not with this particular command.

However, I think parsing the existing quite well structured output with perl or awk is quite easy, and I think that it is no more prone to breakage than the CSV output.

Nonetheless, if you're willing to submit a pull request to add support for CSV output into channel info command, you're very welcome to do so.

@Elbandi
Copy link

Elbandi commented Oct 2, 2022

#370

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

No branches or pull requests

3 participants