Code

perl plugin: Exported plugin_dispatch_notification() to Perl.
authorSebastian Harl <sh@tokkee.org>
Mon, 28 Jan 2008 11:23:10 +0000 (12:23 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Mon, 4 Feb 2008 16:40:23 +0000 (17:40 +0100)
commit91da0566d4deed97ef6d122d02c7de8a8736a882
tree987d4479665b61778abae84871913c8cc2cb2f2f
parent994a59d82c39b8cd5718be7574f11bd184e88b6e
perl plugin: Exported plugin_dispatch_notification() to Perl.

This adds the following function to collectd's Perl API:

Collectd::plugin_dispatch_notification:
  submit a notification to collectd's notification mechanism

  arguments:
  notif - notification

A notification is a reference to a hash with the following members:
  severity => $severity (default: NOTIF_FAILURE)
  time     => $time (default: time (NULL))
  message  => $msg
  host     => $host (default: hostname_g)
  plugin   => $plugin
  type     => $type
  plugin_instance => $instance
  type_instance   => $type_instance

The severity should be any of the Collectd::NOTIF_* constants.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
bindings/perl/Collectd.pm
src/perl.c