Class CheckNrpe


  • public abstract class CheckNrpe
    extends Object

    CheckNrpe class.

    Version:
    $Id: $
    Author:
    ranger
    • Field Detail

      • DEFAULT_PORT

        public static final int DEFAULT_PORT
        Constant DEFAULT_PORT=5666
        See Also:
        Constant Field Values
      • DEFAULT_TIMEOUT

        public static final int DEFAULT_TIMEOUT
        Constant DEFAULT_TIMEOUT=10
        See Also:
        Constant Field Values
    • Constructor Detail

      • CheckNrpe

        public CheckNrpe()
    • Method Detail

      • executeQuery

        public static NrpePacket executeQuery​(String host,
                                              String buffer)
                                       throws Exception

        executeQuery

        Parameters:
        host - a String object.
        buffer - a String object.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        Exception - if any.
      • executeQuery

        public static NrpePacket executeQuery​(String host,
                                              String buffer,
                                              int padding)
                                       throws Exception

        executeQuery

        Parameters:
        host - a String object.
        buffer - a String object.
        padding - a int.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        Exception - if any.
      • executeQuery

        public static NrpePacket executeQuery​(String host,
                                              int port,
                                              String buffer,
                                              int padding)
                                       throws Exception

        executeQuery

        Parameters:
        host - a String object.
        port - a int.
        buffer - a String object.
        padding - a int.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        Exception - if any.
      • sendPacket

        public static NrpePacket sendPacket​(short type,
                                            short resultCode,
                                            String buffer)
                                     throws Exception

        sendPacket

        Parameters:
        type - a short.
        resultCode - a short.
        buffer - a String object.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        Exception - if any.