GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::NSCA::CLIENT::DATAPACKET (3)

.ds Aq ’

NAME

Net::NSCA::Client::DataPacket - Implements data packet for the NSCA protocol

CONTENTS

VERSION

This documentation refers to version 0.009002

SYNOPSIS



  use Net::NSCA::Client;
  use Net::NSCA::Client::DataPacket;

  # Create a packet from scratch
  my $packet = Net::NSCA::Client::DataPacket->new(
    hostname            => www.example.net,
    service_description => Apache,
    service_message     => OK - Apache running,
    service_status      => $Net::NSCA::Client::STATUS_OK,
    unix_timestamp      => $iv_timestamp,
  );

  # Create a packet recieved from over the network
  my $recieved_packet = Net::NSCA::Client::DataPacket->new(
      raw_packet => $recieved_data,
  );



DESCRIPTION

Represents the data packet used in the NSCA protocol.

CONSTRUCTOR

This is fully object-oriented, and as such before any method can be used, the constructor needs to be called to create an object to work with.

    new

This will construct a new object.
new(%attributes) %attributes is a HASH where the keys are attributes (specified in the ATTRIBUTES section).
new($attributes) $attributes is a HASHREF where the keys are attributes (specified in the ATTRIBUTES section).
new($packet_string) $packet_string is a string of the data packet in the network form.

ATTRIBUTES



  # Set an attribute
  $object->attribute_name($new_value);

  # Get an attribute
  my $value = $object->attribute_name;



    hostname

<B>RequiredB>

This is the host name of the host as listed in Nagios that the service belongs to.

    packet_version

This is the version of the packet to be sent. A few different NSCA servers use slightly different version numbers, but the rest of the packet is the same. If not specified, this will default to 3.

    raw_packet

This is the raw packet to send over the network. Providing this packet to the constructor will automatically populate all other attributes and so they are <B>notB> required if this attribute is provided.

    service_description

<B>RequiredB>

This is the service description as listed in Nagios of the service that this report will be listed under.

    service_message

<B>RequiredB>

This is the message that will be given to Nagios.

    service_status

<B>RequiredB>

This is the status of the service that will be given to Nagios. It is recommended to use one of the $STATUS_ constants provided by Net::NSCA::Client.

    server_config

This specifies the configuration of the remote NSCA server. See Net::NSCA::Client::ServerConfig for details about using this. Typically this does not need to be specified unless the NSCA server was compiled with customizations.

    unix_timestamp

This is a UNIX timestamp, which is an integer specifying the number of non-leap seconds since the UNIX epoch. This will default to the current UNIX timestamp.

METHODS

    to_string

This methods returns the string representation of the data packet. This string representation is what will be sent over the network.

DEPENDENCIES

o Digest::CRC
o Moose 0.89
o MooseX::Clone
o MooseX::StrictConstructor 0.08
o Net::NSCA::Client::ServerConfig
o namespace::clean 0.04

AUTHOR

Douglas Christopher Wilson, <doug at somethingdoug.com>

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-net-nsca-client at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-NSCA-Client>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

I highly encourage the submission of bugs and enhancements to my modules.

LICENSE AND COPYRIGHT

Copyright 2009 Douglas Christopher Wilson.

This program is free software; you can redistribute it and/or modify it under the terms of either:
o the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
o the Artistic License version 2.0.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::NSCA::CLIENT::DATAPACKET (3) 2016-04-04

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.