-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hopefully I'm not jumping the gun here. I will probably do some additional digging, but wanted to report what I'm seeing.
I'm using puppet agent 4.9.2
The plugin is able to parse last_run_summary.yaml if my puppet run is a success, but consider the case where a puppet run results in the following.
"Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not find declared class...."
In that case my last_run_summary.yaml looks something like this.
version:
config:
puppet: 4.9.2
time:
last_run: 1487266691
This means that around lines 312-322 of the plugin it fails to parse last_run_summary.yaml resulting in a "UNKNOWN: last_run_summary.yaml not found, not readable or incomplete".
It seems that if a catalog can't be retrieved from the puppet master the resulting last_run_summary.yaml isn't valid for the purposes of this nagios plugin. I'm not sure how unique this case is, but I think it would be preferable to identify this case and report something about the agent being unable to retrieve it's catalog on the last puppet run instead of UNKNOWN.
You should be able to replicate this case by removing a module from your puppet environment that contains classes used in your manifests.