allangood / check_mk

Check_MK related work
GNU General Public License v2.0
16 stars 13 forks source link

Only extracting last_run from last_run_summary.yaml #19

Open rrinco opened 7 years ago

rrinco commented 7 years ago

Hi! I've had to remove an extra space (between : and $) from those lines below on plugins/linux/mk_puppet to be able to extract values from last_run_summary.yaml:

before: echo "${OUT}" | grep -A8 '^resources: $' | sed 's/^/resources/g' echo "${OUT}" | grep -A3 '^events: $' | sed 's/^/events/g' after: echo "${OUT}" | grep -A8 '^resources:$' | sed 's/^/resources/g' echo "${OUT}" | grep -A3 '^events:$' | sed 's/^/events/g'

My puppet version is 4.7.0.

rrinco commented 7 years ago

And also had to change -A8 to -A9 to be able to extract all resources values.

allangood commented 7 years ago

Hi rrinco,

I need to test it with different puppet versions before commit any change.

Thank you to report.