github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

bingos / poe-component-client-nsca

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (1)
    • 0.16
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

(perl) a POE Component that implements send_nsca functionality — Read more

  cancel

http://search.cpan.org/dist/POE-Component-Client-NSCA/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Squashed warnings in testsuite 
Chris Williams (author)
Fri Jun 19 02:29:21 -0700 2009
commit  c9652bb195e683ee2ee5c45c8aa423b13c1222fd
tree    20143d281b7ec18bc8a8096cc04a3aeafb71500d
parent  c9ca648f2213de755f9b310a0c374c5338830c1e
poe-component-client-nsca /
name age
history
message
file Changes Loading commit data...
file GPL
file LICENSE
file MANIFEST
file Makefile.PL
file README
directory examples/
directory lib/
directory t/
README
NAME
    POE::Component::Client::NSCA - a POE Component that implements send_nsca
    functionality

SYNOPSIS
       use strict;
       use POE qw(Component::Client::NSCA);
       use Data::Dumper;

       POE::Session->create(
            inline_states => {
                    _start =>
                    sub {
                       POE::Component::Client::NSCA->send_nsca(
                            host    => $hostname,
                            event   => '_result',
                            password => 'moocow',
                            encryption => 1, # Lets use XOR
                            message => {
                                            host_name => 'bovine',
                                            svc_description => 'chews',
                                            return_code => 0,
                                            plugin_output => 'Chewing okay',
                            },
                       );
                       return;
                    },
                    _result =>
                    sub {
                       my $result = $_[ARG0];
                       print Dumper( $result );
                       return;
                    },
            }
       );

       $poe_kernel->run();
       exit 0;

DESCRIPTION
    POE::Component::Client::NSCA is a POE component that implements
    "send_nsca" functionality. This is the client program that is used to
    send service check information from a remote machine to an nsca daemon
    on the central machine that runs "Nagios".

    It is based in part on code shamelessly borrowed from Net::Nsca and
    optionally supports encryption using the Mcrypt module.

CONSTRUCTOR
    "send_nsca"
        Takes a number of parameters:

          'host', the hostname or IP address to connect to, mandatory;
          'event', the event handler in your session where the result should be sent, mandatory;
          'password', password that should be used to encrypt the packet, mandatory;
          'encryption', the encryption method to use, see below, mandatory;
          'message', a hashref containing details of the message to send, see below, mandatory;
          'session', optional if the poco is spawned from within another session;
          'port', the port to connect to, default is 5667;
          'context', anything you like that'll fit in a scalar, a ref for instance;
          'timeout', number of seconds to wait for socket timeouts, default is 10;

        The 'session' parameter is only required if you wish the output
        event to go to a different session than the calling session, or if
        you have spawned the poco outside of a session.

        The 'encryption' method is an integer value indicating the type of
        encryption to employ:

               0 = None        (Do NOT use this option)
               1 = Simple XOR  (No security, just obfuscation, but very fast)

               2 = DES
               3 = 3DES (Triple DES)
               4 = CAST-128
               5 = CAST-256
               6 = xTEA
               7 = 3WAY
               8 = BLOWFISH
               9 = TWOFISH
               10 = LOKI97
               11 = RC2
               12 = ARCFOUR

               14 = RIJNDAEL-128
               15 = RIJNDAEL-192
               16 = RIJNDAEL-256

               19 = WAKE
               20 = SERPENT

               22 = ENIGMA (Unix crypt)
               23 = GOST
               24 = SAFER64
               25 = SAFER128
               26 = SAFER+

        Methods 2-26 require that the Mcrypt module is installed.

        The 'message' hashref must contain the following keys:

          'host_name', the host that this check is for, mandatory;
          'return_code', the result code for the check, mandatory;
          'plugin_output', the output from the check, mandatory;
          'svc_description', the service description ( required if this is a service not a host check );

        The poco does it's work and will return the output event with the
        result.

OUTPUT EVENT
    This is generated by the poco. ARG0 will be a hash reference with the
    following keys:

      'host', the hostname given;
      'message', the message that was sent;
      'context', anything that you specified;
      'success', indicates that the check was successfully sent to the NSCA daemon;
      'error', only exists if something went wrong;

AUTHOR
    Chris "BinGOs" Williams <chris@bingosnet.co.uk>

    Based on Net::Nsca by P Kent

    Which was originally derived from work by Ethan Galstad.

    See the LICENSE file for details.

LICENSE
    Copyright © Chris Williams, P Kent and Ethan Galstad.

    This module may be used, modified, and distributed under the same terms
    as Perl itself. Please see the license that came with your Perl
    distribution for details.

SEE ALSO
    POE

    Net::Nsca

    Mcrypt

    <http://www.nagios.org/>

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server