Closed mark-hyde closed 5 years ago
Would something in the format:
STATUS:FAILED:Small description of state
//
STATUS:SUCCESS:Small description of state
On the last line work for you?
That would be super!
I've popped a quick PR in #214. I went with a SUCCESS status for no package updates available as everything technically ran correctly. Let me know what you think, and if you want any changes made.
Closing now that #214 has been merged in.
I've a script which I run across multiple servers to determine the success/failure status of each phase of auter for reporting purposes.
/var/lib/auter/last-{phase}-output-default is generated for each phase of auter, and overwritten with the output from the latest run each time.
We wish to be able to determine, by examining this file, whether or not this specific phase of the auter run has succeeded or failed at the latest attempt.
The following approaches are currently possible but have downsides: A - grep for the auter logs in /var/log/messages. Look for 'auter --{phase} ' and then look for any 'ERROR' which follows.
B - find the datestamp at the top of the output file, look for ERRORs in the system log at that time.
C - grep -i ERROR in the 'output file' for that phase
Instead could you add a status line to the end of the /var/lib/auter/last-{phase}-output-default files with an easily parse-able status