Class CheckNrpe
- java.lang.Object
-
- org.opennms.netmgt.poller.monitors.nrpe.CheckNrpe
-
public abstract class CheckNrpe extends java.lang.Object
CheckNrpe class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PORT
ConstantDEFAULT_PORT=5666
static int
DEFAULT_TIMEOUT
ConstantDEFAULT_TIMEOUT=10
-
Constructor Summary
Constructors Constructor Description CheckNrpe()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NrpePacket
executeQuery(java.lang.String host, int port, java.lang.String buffer, int padding)
executeQuerystatic NrpePacket
executeQuery(java.lang.String host, java.lang.String buffer)
executeQuerystatic NrpePacket
executeQuery(java.lang.String host, java.lang.String buffer, int padding)
executeQuerystatic void
main(java.lang.String[] argv)
mainstatic java.lang.String
nextArg(java.lang.String[] argv, int i)
nextArgstatic NrpePacket
sendPacket(short type, short resultCode, java.lang.String buffer)
sendPacket
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
ConstantDEFAULT_PORT=5666
- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
ConstantDEFAULT_TIMEOUT=10
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeQuery
public static NrpePacket executeQuery(java.lang.String host, java.lang.String buffer) throws java.lang.Exception
executeQuery
- Parameters:
host
- aString
object.buffer
- aString
object.- Returns:
- a
org.opennms.netmgt.poller.nrpe.NrpePacket
object. - Throws:
java.lang.Exception
- if any.
-
executeQuery
public static NrpePacket executeQuery(java.lang.String host, java.lang.String buffer, int padding) throws java.lang.Exception
executeQuery
- Parameters:
host
- aString
object.buffer
- aString
object.padding
- a int.- Returns:
- a
org.opennms.netmgt.poller.nrpe.NrpePacket
object. - Throws:
java.lang.Exception
- if any.
-
executeQuery
public static NrpePacket executeQuery(java.lang.String host, int port, java.lang.String buffer, int padding) throws java.lang.Exception
executeQuery
- Parameters:
host
- aString
object.port
- a int.buffer
- aString
object.padding
- a int.- Returns:
- a
org.opennms.netmgt.poller.nrpe.NrpePacket
object. - Throws:
java.lang.Exception
- if any.
-
sendPacket
public static NrpePacket sendPacket(short type, short resultCode, java.lang.String buffer) throws java.lang.Exception
sendPacket
- Parameters:
type
- a short.resultCode
- a short.buffer
- aString
object.- Returns:
- a
org.opennms.netmgt.poller.nrpe.NrpePacket
object. - Throws:
java.lang.Exception
- if any.
-
main
public static void main(java.lang.String[] argv) throws java.lang.Exception
main
- Parameters:
argv
- an array ofString
objects.- Throws:
java.lang.Exception
- if any.
-
nextArg
public static java.lang.String nextArg(java.lang.String[] argv, int i) throws java.lang.Exception
nextArg
- Parameters:
argv
- an array ofString
objects.i
- a int.- Returns:
- a
String
object. - Throws:
java.lang.Exception
- if any.
-
-