You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we're using rs/zerolog to generate JSON formatted, leveled and structured log messages. These messages contain structured logging fields that have have a mostly standardized base collection of fields, but each plugin also adds its own. Most are specific to its use, but there is likely some duplication as well.
In addition to the problem of potential duplication, there is also the issue of inconsistent field names across plugins. In one, we may have virtual_machines as a field name, while in another vms for the same purpose.
Example:
log.Debug().
Str("vms_filtered_by_name", strings.Join(vsphere.VMNames(filteredVMs), ", ")).
Int("vms_excluded_by_name", numVMsExcludedByName).
Msg("VMs after name filtering")
We have a CSV list of VM names that passes named-based filtering, then we have a count of VMs that were excluded based on that filtering.
I'm not sure yet how to handle a mix of field names where one value is a count of items while another is a CSV listing of items.
I should note that normal output from plugins in this project is intended to go to stdout where Nagios will capture it and use the information in the web UI and notifications, whereas log output goes to stderr and (aside from Icinga as noted in #314) is ignored by the monitoring system. While the output is intended for troubleshooting purposes, I'd still like the field names to have some consistency as they're likely to end up matching the performance data field names closely (which are intended for exposure under normal operation).
Questions
Should we use a *_list suffix for the CSV list?
e.g., vms_list_filtered_by_name or vms_filtered_by_name_list
Should we convert the CSV list to a JSON array of values?
Should we prefix field names for a numeric value with num_*?
e.g., num_vms_excluded_by_name
The text was updated successfully, but these errors were encountered:
Background
Currently we're using
rs/zerolog
to generate JSON formatted, leveled and structured log messages. These messages contain structured logging fields that have have a mostly standardized base collection of fields, but each plugin also adds its own. Most are specific to its use, but there is likely some duplication as well.In addition to the problem of potential duplication, there is also the issue of inconsistent field names across plugins. In one, we may have
virtual_machines
as a field name, while in anothervms
for the same purpose.Example:
We have a CSV list of VM names that passes named-based filtering, then we have a count of VMs that were excluded based on that filtering.
I'm not sure yet how to handle a mix of field names where one value is a count of items while another is a CSV listing of items.
I should note that normal output from plugins in this project is intended to go to
stdout
where Nagios will capture it and use the information in the web UI and notifications, whereas log output goes tostderr
and (aside from Icinga as noted in #314) is ignored by the monitoring system. While the output is intended for troubleshooting purposes, I'd still like the field names to have some consistency as they're likely to end up matching the performance data field names closely (which are intended for exposure under normal operation).Questions
*_list
suffix for the CSV list?vms_list_filtered_by_name
orvms_filtered_by_name_list
num_*
?num_vms_excluded_by_name
The text was updated successfully, but these errors were encountered: