collectd log entries could be enhanced

Description

It would be nice to have the collectd logs include the package for which a collection was running. Since you can define multiple packages in collectd-configuration.xml with a service which could each have their own collection package, it would be nice to know which particular package was gathering statistics.

The attached patch adds the package name for when a collection starts. It also logs a warning when the collection failed due to a CollectionException or other Exception. And finally, it adds an informational message if the collection has successfully finished its run.

An example of what it looks like in logs:

2011-06-24 09:54:42,499 INFO [CollectdScheduler-100 Pool-fiber62] CollectableService: run: starting new collection for 172.16.79.52/SNMP/UnixTeam_GlobalZones_Extra
2011-06-24 09:58:43,122 WARN [CollectdScheduler-100 Pool-fiber62] CollectableService: run: failed collection for 172.16.79.52/SNMP/UnixTeam_GlobalZones_Extra
2011-06-24 09:58:43,122 ERROR [CollectdScheduler-100 Pool-fiber62] CollectableService: Timeout retrieving SnmpCollectors for 172.16.79.52 ....

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Show:

Seth Leger June 28, 2011 at 4:38 PM

Also, thanks a bunch for providing the patch in git format. That makes it super-easy to apply by using the 'git apply' command.

Seth Leger June 28, 2011 at 4:37 PM

Applied the patch, thanks Ron!

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created June 24, 2011 at 1:11 PM
Updated January 27, 2017 at 4:21 PM
Resolved June 28, 2011 at 4:37 PM