Translations of this page:

Osmius

Osmius agent for JetDirect images.tigerdirect.com_skuimages_large_hp-p1005-printer1.jpg
Agent name: osm_ag_HPJETDIR Agent code: HPJETDIR
Subject: HP JetDirect Osmius agent User manual
Date: 21/04/2010 Revision date: 21/04/2010

General Information

This agent can monitor several parameters of periperal devices (printers or print servers) implementing JetDirect using the SNMP protocol. This agent can check if the device is out of paper or toner level or even if human intervention is required. It is recommended to test this agente before using it in production environments.

The JetDirect Osmius agent has been developed using functionalities and enhancements of Osmius framework and ACE libraries, so it is necessary to install the ACE libraries for the proper deployment and operation of agente. See chapter: installation.

HPJETDIR agent provides up to 15 preconfigured events and 10 user events with customizable parametersto allow better level of scalability and configuration.

In this agent all the provided events are non-intrusive events, remote events, so they can be retrieved from the network outside of the Instance being monitored.

JetDirect Instance

As a general rule each Osmius agent can monitor one instance type. If you are not familiar with these concepts check out the glossary. Each instance is individually defined in the configuration file (if you want further information go to agents and instances); depending on agent type is the instance type and depending on instance is the connection info.

CONNECTION_INFO

The connection information or connection_info is data that the agent needs to know to connect to the instance. (See more about the connection_info)

In the particular case of JetDirect agent the CONNECTION_INFO field has no information needs as it uses the generic SNMP fields like Nodename, read community and snmp port.

CONNECTION_INFO= 

TYPE

The type defines the instance type to be monitored. Every declared instance must be associated with a type as you can see here

For HP JetDirect devices:

TYPE = HPJETDIR

Event Summary Table

Here is briefly the capabilities of this agent, further down on this page each event is described in more detail.

EVENT DESCRIPTION c w a tseconds Extra parameters / Remarks
JDSYSDES System Description (SNMP) 1 0 0 86400 Informational event
JDSYSUPT System Uptime in timeticks 1 0 0 300 Informational event
JDSYSLOC System Location1 0 0 86400 Informational event
JDSYSNAM System Name (SNMP) 1 0 0 86400 Informational event
JDSYSCON Contact Info 1 0 0 86400 Informational event
JDLINSTS Line state of the the peripheral. 0 1 1 300 Non-zero means off-line
JDPAPSTS State of the paper on the peripheral. 0 1 1 300 Non-zero means paper problem
JDINTREQ Intervention state. 0 1 1 300 Non-zero requires human intervention to continue working
JDPAPOUT The peripheral is out of paper. 0 1 1 300 0-Off 1-out or paper mount 2-manual feed
JDPAPJAM The peripheral has a paper Jam. 0 1 1 300 0-Off 1-paper jam
JDTONLOW Low toner condition.0 1 1 300 0-Ok 1-Toner Low 2-No cartridge
JDDEVBUS Device busy printing data.0 2 2 300 0-Ok 1-Busy
JDWARMUP Device is warming up.0 1 1 300 0-Ok 1-Initializing 2-Warming up
JDOPENDO Peripheral cover or door is open.0 1 1 300 0-Ok
JDOUTPRB Paper Output problem. 0 1 1 0-Ok
JDUSER01 a JDUSER10 Get the SNMP values for the proposed parameters 1 0 0 600 Silent mode ( -s) recommmended
You can define from JDUSER01 hasta JDUSER10 (10 eventos)
-O oid -N override_nodename -K ovr_community -P ovr_port -V 2

JetDirect Events

JDSYSDES

JDSYSDES returns system description in the event associated text.

Return values:

VALUE MEANING
1 Error
0 Ok

Recommended parameters:

Comparison type Inverted. The higher the value the lesser the severity. (-c 1)
Monitoring interval Once a day
Warning threshold 0
Alert threshold 0

Parameter setting example:

JDSYSDES = -t 86400 -c 1 -w 0 -a 0 -T "System Description"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDSYSCON

JDSYSCOM returns the system contact info in the event associated text.

Return values:

VALUE MEANING
1 Error
0 Ok

Recommended parameters:

Comparison type Inverted. The higher the value the lesser the severity. (-c 1)
Monitoring interval Once a day
Warning threshold 0
Alert threshold 0

Parameter setting example:

JDSYSCON = -t 86400 -c 1 -w 0 -a 0 -T "Contact"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDSYSLOC

JDSYSLOC returns the system location info in the event associated text.

Return values:

VALUE MEANING
1 Error
0 Ok

Recommended parameters:

Comparison type Inverted. The higher the value the lesser the severity. (-c 1)
Monitoring interval Once a day
Warning threshold 0
Alert threshold 0

Parameter setting example:

JDSYSLOC = -t 86400 -c 1 -w 0 -a 0 -T "System Location"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDSYSNAM

JDSYSNAM returns the system name in the event associated text.

Return values:

VALUE MEANING
1 Error
0 Ok

Recommended parameters:

Comparison type Inverted. The higher the value the lesser the severity. (-c 1)
Monitoring interval Once a day
Warning threshold 0
Alert threshold 0

Parameter setting example:

JDSYSNAM = -t 86400 -c 1 -w 0 -a 0 -T "System Description"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDSYSUPT

JDSYSUPT event returns the number of ticks since the system was last time started up.

Return values:

VALUE MEANING
-1 Error
X Timeticks

Recommended parameters:

Comparison type Inverted. The higher the value the lesser the severity. (-c 1)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 600 seconds. Consult on administrator
Alert threshold 300 seconds. Consult on administrator

Parameter setting example:

JDSYSUPT = -t 3600 -c 1 -w 600 -a 300 -T "System Uptime"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDLINSTS

JDLINSTS returns the line state of the the peripheral. Non-zero means off-line

Return values:

VALUE MEANING
-1 Error
0 On-Line
N>0 Off-line

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDLINSTS = -t 300 -c 0 -w 1 -a 1 -T "Line State"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDPAPSTS

JDPAPSTS returns the state of the paper on the peripheral. Non-zero means paper problem

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 Problems

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDPAPSTS = -t 300 -c 0 -w 1 -a 1 -T "Paper State"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDINTREQ

JDINTREQ returns the Intervention state. Non-zero means required human intervention to continue working

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 Problems

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDINTREQ = -t 300 -c 0 -w 1 -a 1 -T "Intervention State"

Remarks: This event uses the Osmius SNMP interface which in turn uses Net-SNMP libraries.

JDPAPOUT

JDPAPOUT returns if the peripheral is out of paper. 0-Off 1-out or paper mount 2-manual feed

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 Problems

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDPAPOUT = -t 300 -c 0 -w 1 -a 1 -T "Out of Paper State"

JDPAPJAM

JDPAPJAM returns if the peripheral has a paper Jam. 0-Off 1-paper jam

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 Problems

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDPAPJAM = -t 300 -c 0 -w 1 -a 1 -T "Paper Jam State"  

JDTONLOW

JDTONLOW returns low toner condition. 0-Off 1-Toner Low 2-No Cartridge

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 1-Toner Low 2-No Cartridge

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 2

Parameter setting example:

JDTONLOW = -t 300 -c 0 -w 1 -a 2 -T "Tonewr Low State" 

JDDEVBUS

JDDEVBUS returns if the device busy printing data. 0-Ok 1-Busy

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 Problems

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDDEVBUS = -t 300 -c 0 -w 1 -a 1 -T "Device busy" 

JDWARMUP

JDWARMUP returns if the device is warming up. 0-Ok 1-Initializing 2-Warming up

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 1-Initializing 2-Warming up

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDWARMUP = -t 300 -c 0 -w 1 -a 1 -T "Device is Warming up"

JDOPENDO

JDOPENDO returns if a cover or door is open. 0-Ok

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 Problems

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDOPENDO = -t 300 -c 0 -w 1 -a 1 -T "Cover or door is open"

JDOUTPRB

JDOUTPRB returns if the is a paper Output problem. 0-Ok

Return values:

VALUE MEANING
-1 Error
0 Ok
N>0 Problems

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JDOUTPRB = -t 300 -c 0 -w 1 -a 1 -T "Paper output problem"    

JDUSER01

JDUSER01 aunches a SNMP get using the provided parameters. If the oid result is numeric this event returns a numeric value. If the oid result is a string this event returns 1 when everything is ok and the string within the event text. If something fails the returned value is 0.

Extra parameters:

PARAMETER MEANING Mandatory
-O -O “oid”- oid to recover. Try first one of these commands “snmpwalk -v2 -O f -c community target_IP” or “snmpget -v2c -c community -o oid target_IP. Yes
-N -L “nodename” - This node name overrides the one in the Instance CONNECTION_INFO and the default one (agent hostname). No
-K -K “community” - This “community name” overrides the one in the instance CONNECTION_INFO and the default one (“public”). No
-P -P “port” - This “port” overrides the one in the instance CONNECTION_INFO and the default one (161). No
-Q -Q “timeout” - timeout in seconds for the snmpget operations. Defaults to 0, no timeout. No
-V -V “version” - SNMP protocol version. Allowed values are [1, 2]. Defaults 2 (v2c). No

Return values:

VALUE MEANING
-1 Error
0 Failed to retrieve
1 String value correctly retrieved
N Numeric value correctly retrieved

Recommended parameters:

Comparison Type Inverted or Direct. Depending on the oid parameter.
monitoring interval 300 seconds – 1 hour –> depends on the instance classification
warning threshold 0 or N depending on the oid type
critical threshold or N depending on the oid type

Parameter setting example:

JDUSER01 = -t 300 -c 1 -w 0 -a 0 -T "Snmp system description" -O ".iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0" -K secret_community -P 177 -Q 3 -V 1

Remarks: The associated SNMP text will be into the event text.
This event uses the Net-SNMP libraries

prerequisites JetDirect

In order to compile, this agent requires a set of prerequisites, which are generic to compile any Osmius agent, you can see these prerequisites.

In this particular agent you must also install Net-SNMP librares (Ubuntu “libsnmp”) that can be found here: http://net-snmp.sourceforge.net/ and in you OS repositories.

Makefiles and Compiling

  • Make Project Creator (MPC) is used by Osmius, so creating Makefiles is a trivial task. If you want to learn more about MPC and Osmius check out the section of Makefiles on Osmius.
  • In order to compile this agent we need include files and libraries provided by Net-SNMP (Ubuntu “libsnmp-dev”).
  • You can generate Makefile in this way:

From the agent directory using console or terminal.

$ACE_ROOT/bin/mpc.pl -type gnuace osm_ag_hpjetdirect.mpc
  • Now that you have created the Makefile, agent compiling is extremely simple.
gmake -f Makefile.Osm_Ag_Hpjetdirect_Osmius

Binaries are automatically installed in the bin directory of OSM_ROOT base directory.

Running the agent

The Osmius JetDirect agent have the same running features of the other Osmius agents. You can check it out int he section Start and Stop Agents.

Without Osmius web console:

osm_ag_HPJETDIR -c osm_ag_HPJETDIR.ini -m MASTERAG -p 1950 -d [>> osm_ag_hpjetdir.log]1)

Running in standalone mode

The Osmius JetDirect agent, like the others Osmius agents, allows the execution in standalone mode. This option may be particularly useful when developing a new agent or to perform specific agent tests.

Basically you have to add a new value, called SNDCMD, to Osmius agent configuration file agente de Osmius (osm_ag_HPJETDIR.ini) as shown here.

Setting Master Agent communications port to zero, for example:

osm_ag_HPJETDIR -c osm_ag_HPJETDIR.ini -m 00000000 -p 0 -d

Tests list

Test performed to agent.

Date: 21/04/2010
Test Result Remarks
Creating an instance with all its events in silent mode OK N/A
Creating an instance with all its events with custom text OK N/A
Creating an instance with all its events but no custom text OK N/A
Declaración de 1 instancia con todos sus eventos a 60 seconds y mantenerlo
running for 48 hours
OK no se detectan pérdidas de memoria
Declare 2 instances, cause a disconnect and then reconnectNA N/A
Declare 1 instance and test each event OK NA
Elimination of general parameter and check unbootable OK N/A
Elimination of instance CONN_INFO and check unbootable NA No mandatory connect info
1) Optional, to store agent messages in a file
 
en/agentes/hpjetdir.txt · Last modified: 2012/12/12 09:38 by osmius
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki