Architecture - Core Plugin
Core plugin is embedded into the FriendlySNMP agent.
It is activated at agent startup and cannot be altered or replaced.
The core plugin supports
FRIENDLY-SNMP-MIB .
The content of this MIB is discussed below.
You could also run the
demo application to experiment with this MIB.
Application information
The application information is stored in tables declared in the node
appInfo in the
FRIENDLY-SNMP-MIB .
These tables have various read-only static information related to the application.
appInfoTable
This read-only table gives an overview of the application.
This table has entries with the application title, version and
all configuration properties which have a prefix
app<dot> in the key.
appDependenciesTable
This read-only table has a list of application dependencies.
The agent adds to the list all libraries it depends on including SNMP4J.
The application has an option to add entries to this list
by adding configuration properties with a prefix
dependency<dot> in the key.
appPropTable
This read-only table has a list of all application properties.
The content of this table is taken from the properties object passed
to the agent constructor,
appConfigTable
This read-only table has a list of all agent properties.
The list includes default values which were not explicitly declared.
sysPropTable
This read-only table has a list of system properties.
The list may help to debug JVM issues.
Agent notifications
The FriendlySNMP agent generates various notifications declared in the node
appEvents in the
FRIENDLY-SNMP-MIB .
See also
exceptions and
deadlock below and a
heartbeat plugin.
Agent cold / warm start notifications are also supported
and covered in the SNMPv2-MIB
RFC 3418.
appStop
The notification is generated when the agent stops (suspended).
appShutdown
This notification is generated by the agent when it shutdowns.
Usually the agent is shutdown when the JVM exits.
This event is intercepted via JVM shutdown hook.
The agent could be shutdown explicitly by calling
org.friendlysnmp.FriendlyAgent.shutdown() method.
Remote shutdown
shutdownApp
This read-write scalar in the node
appEvents in the
FRIENDLY-SNMP-MIB
provides an option to
remotely shutdown
the application.
Exceptions
The exceptions related notifications, scalars and tables are declared in the node
appEvents in the
FRIENDLY-SNMP-MIB .
appExceptionCaught
This notification is generated by the agent when a new caught exception is registered.
The new exception is registered with explicit call of the method
reportException()
available in the agent, group and MIB classes.
appExceptionUncaught
This notification is generated by the agent when it discovers an
uncaught runtime exception.
exceptionsListTable
This table contains overview of all exceptions known to the agent.
The table has the following columns:
exceptionsListIndex
- This is index of the exception.
This value could be set to the scalar exceptionViewFixedIndex .
exceptionsListCount
- How many times this exception was thrown.
Only identical exceptions with the same message and the same stack trace
are combined into one with incremented exceptions count.
exceptionsListType
- Exception type (caught / uncaught).
These types in Java terminology are checked / unchecked.
exceptionsListLastOccur
- Last time when this exception was thrown.
exceptionsListMessage
- Exception message.
exceptionsListClass
- Exception object class name.
exceptionsListThread
- Thread where the exception was thrown.
exceptionsListAction
- Action to be performed on this row (keep / delete).
exceptionViewPolicy
This is a read-write scalar which takes a value next or fixed.
The next value assigned to this scalar gives an option to view next
exception details in the exceptionViewTable
each time the table is reloaded in the MIB browser.
The fixed value assigned to this scalar gives an option to view
in the exceptionViewTable a specific exception,
which index is defined in the exceptionViewFixedIndex scalar.
exceptionViewFixedIndex
This is a read-write scalar which takes an index of the exception
to be viewed in the exceptionViewTable when a scalar
exceptionViewPolicy is assigned a fixed value.
exceptionViewTable
This table presents a single exception at a time.
The table contains exception index, count how many times the exception was thrown,
timestamp when this exception was thrown last time,
a thread name where exception was thrown and a full exception stack trace.
The table reloads with the next exception if exceptionViewPolicy
scalar is set to next. The table displays an exception with index specified
in the scalar exceptionViewFixedIndex if
exceptionViewPolicy scalar is set to fixed.
Deadlock
The deadlock related notification, scalars and tables are declared in the node
appEvents in the
FRIENDLY-SNMP-MIB .
appDeadlock
This notification is generated by the agent when it discovers a deadlock.
deadlockCheckInterval
This read-write scalar defines how often the agent checks JVM deadlocks.
The interval is specified in seconds.
The valid range in Java terms is [0 .. Integer.MAX_VALUE].
Setting this value to 0 disables deadlock check.
deadlocksListTable
This table contains overview of all deadlocks discovered by the agent.
The table has the following columns:
deadlocksListDeadlockID
- Sub-index of the row or the deadlock ID.
This is sequential number of discovered deadlock chain.
For example, the first deadlock will have ID=1. This deadlock
may contain 3 threads in a chain. The second deadlock chain
with ID=2 may have another 2 threads in a chain. And so on.
deadlocksListThreadID
- Sub-index of the row. This is a thread ID assigned by JVM.
deadlocksListThreadName
- Thread name.
deadlocksListBlockedByThreadID
- Thread ID which blocks the thread in the row.
deadlocksListBlockedByThreadName
- Thread name which blocks the thread in the row.
deadlocksListLock
- Thread is waiting for this lock.
deadlocksListBlockedTime
- Thread is blocked since this time.
deadlockThreadViewPolicy
This is a read-write scalar which takes a value next or fixed.
The next value assigned to this scalar gives an option to view next
deadlock details in the deadlockThreadViewTable
each time the table is reloaded in the MIB browser.
The fixed value assigned to this scalar gives an option to view
in the deadlockThreadViewTable a specific deadlock
which index is defined in the deadlockThreadViewFixedIndex scalar.
deadlockThreadViewFixedIndex
This is a read-write scalar which takes an index of the deadlock
to be viewed in the deadlockThreadViewTable when a scalar
deadlockThreadViewPolicy is assigned a fixed value.
deadlockThreadViewTable
This table presents a single deadlock thread view.
The table contains deadlock index,
a thread name where deadlock was discovered,
a blocked thread ID and name,
timestamp when deadlock occurred
and a full deadlock stack trace.
The table reloads with the next deadlock if deadlockThreadViewPolicy
scalar is set to next. The table displays a deadlock with index specified
in the scalar deadlockThreadViewFixedIndex if
deadlockThreadViewPolicy scalar is set to fixed.
Agent persistency
This section declares scalars and tables to access agent persistency storage.
See also Persistency.
persistScalarTable
The table contains all persistent scalars overview.
The scalar became persistent when its value was modified from a MIB browser.
The table has the following columns:
persistScalarIndex
- Row index.
persistScalarName
- Scalar name.
persistScalarOID
- Scalar OID.
persistScalarSyntax
- Scalar syntax value. Multiple syntaxes are displayed if the same value
is mapped to multiple syntaxes.
persistScalarValue
- Scalar value.
persistScalarAction
- Action to delete a row.
NOTE: The deleted value is a value which was set from the
MIB browser to override default value. Row deletion affects
persistency table and is propagated to a managed object via
FRestoreDefaultListener . The application is responsible to
handle this event to restore the default scalar value.
If the application ignores this event the default value will be
restored next time the application (agent) is started.
persistTableTable
The table contains all persistent tables overview.
The table became persistent when its content was altered from a MIB browser.
The table has the following columns:
persistTableIndex
- Row index.
persistTableName
- Table name.
persistTableOID
- Table OID.
persistTableColumnCount
- Columns count in the table.
persistTableRowCount
- Rows count in the table.
persistTableAction
- Action to delete a row in the tables persistency storage.
NOTE: The deleted row represents the whole table.
The table became persistent when a table was altered from the
MIB browser to override default values. Row deletion affects
persistency table and is propagated to a managed object via
FRestoreDefaultListener . The application is responsible to
handle this event to restore the default table value.
If the application ignores this event the default value will be
restored next time the application (agent) is started.
persistCellTable
The table contains all persistent tables' cell values.
The table has the following columns:
persistCellIndex
- Row index.
persistCellTableName
- Table name.
persistCellTableOID
- Table OID.
persistCellRowOID
- Row OID.
persistCellColumnName
- Column name.
persistCellColumnOID
- Column ID (OID appendix).
persistCellColumnIndex
- Column index (order).
persistCellColumnSyntax
- Column syntax.
persistCellValue
- Cell value.
|