User guide
(available at http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/index.html) for instructions
on how to change the agent's IP address.
If this does happen it is best to bind the JON agent's life cycle to the VPN connection's life cycle. When
the connection drops, stop the agent. When the connection is up again, update JON_AGENT_ADDR in
/etc/sysconfig/jon-agent-ec2 to reflect the new IP address and restart the agent.
Important
If there is a high number of instances launched and/or terminated it can become impractical to
add and remove them manually from the JON inventory. JON's scripting capabilities can be used
for automate these steps. Refer to the JON documentation for further information.
7.6. Configure EAP and EWS instances to register with JON
For JBoss Enterprise Application Platform, add this to the User Data field:
JON_SERVER_ADDR=jon2.it.example.com
## if instance not already configured to resolve its hostname
JON_AGENT_ADDR=`ip addr show dev eth0 primary to 0/0 | sed -n 's#.* inet \([0-
9.]\+\)/.* #\1#p'`
PORTS_ALLOWED=16163
# insert other JON options when necessary, see Appendix I
For JBoss Enterprise Web Server add this to the User Data field:
cat > /etc/sysconfig/jon-agent-ec2 << "EOF"
iptables -D INPUT -p tcp --dport 16163 -j ACCEPT
iptables -I INPUT -p tcp --dport 16163 -j ACCEPT
JON_SERVER_ADDR=jon2.it.exam ple.com
## if instance not already configured to resolve its hostname
JON_AGENT_ADDR=`ip addr show dev eth0 primary to 0/0 | sed -n 's#.*inet \([0-
9.]\+\)/.* #\1#p'`
# insert other JON options when necessary, see Appendix I
EOF
## start the agent
service jon-agent-ec2 start
Chapter 7. Establish monitoring with JBoss Operations Network (JON)
27