If you are installing XorMon on on a machine where is already running LPAR2RRD then you hit into a port conflict where both tools want to listen on port
8162 which is used for OS agent communication.
XorMon fails to start OS agent service as port 8162 is already occupied by LPAR2RRD daemon listener.
Solutions
- Stop LPAR2RRD daemon service, start XorMon OS agent service
All OS agent data will be handled by XorMon
- Start XorMon on different port
Direct some al all OS agents to that port, both tools might receive all agent data
- Start LPAR2RRD on a different port
XorMon will use the default one 8162 and hand over all traffic, some agents can be directed to LPAR2RRD new port then
1. Stop LPAR2RRD daemon service, start XorMon OS agent service
- Stop LPAR2RRD daemon (under lpar2rrd user)
cd /home/lpar2rrd/lpar2rrd
vi etc/lpar2rrd.cfg
LPAR2RRD_AGENT_DAEMON=1
-->
LPAR2RRD_AGENT_DAEMON=0
./load.sh daemon_stop
Make sure port is free, nothing should be listed by this cmd
netstat -an | grep 8162| grep -i listen
ss -an | grep 8162| grep -i listen # on newer systems where netstat is not available
- Start XorMon OS agent service
UI ➡ settings ➡ Application ➡ Services ➡ OS agent ➡ ON
If that does not start, check logs in: UI ➡ settings ➡ Logs ➡ Microservice ➡ OS agent
2. Start XorMon on different port
- Congfigure OS Agent port in the XorMon UI
- XorMon 2.3.0+:
UI ➡ Settings ➡ Configuration ➡ Application ➡ Services ➡ Open Advanced settings for "OS Agent" ➡ Change key
- XorMon 2.2.x and older:
UI ➡ Settings ➡ Configuration ➡ Application ➡ Services ➡ Open Advanced settings for "OS Agent" ➡ Add new key:value pair:
key: PORT
value: 9162
Re-start OS agent service:UI ➡ settings ➡ Application ➡ Services ➡ OS agent ➡ ON
If that does not start, check log in: UI ➡ settings ➡ Logs ➡ Microservice ➡ OS agent
- Direct OS agent to that new port, change crontab entry on the OS agent side
- LPAR2RRD OS agent:
su - lpar2rrd
crontab -e
* * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <XorMon-host> > /var/tmp/lpar2rrd-agent.out 2>&1
-->
* * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <XorMon-host>:9162 > /var/tmp/lpar2rrd-agent.out 2>&1
You can even direct OS agent to more servers (LPAR2RRD and XorMon, just add new host into the crontab)
su - lpar2rrd
crontab -e
* * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-host> <XorMon-host>:9162 > /var/tmp/lpar2rrd-agent.out 2>&1
- XorMon OS agent:
Edit /opt/xormon-agent/agent.yaml and change port from 8162 to 9162
# Target XorMon servers
servers:
- host: "192.168.1.1"
port: 8162
-->
# Target XorMon servers
servers:
- host: "192.168.1.1"
port: 9162
Restart xormon service under root:
systemctl restart xormon-agent
3. Start LPAR2RRD on a different port
- Change LPAR2RRD daemon port from 8162 to for example 9162 (under lpar2rrd user)
cd /home/lpar2rrd/lpar2rrd
vi etc/lpar2rrd.cfg
LPAR2RRD_AGENT_DAEMON_PORT=8162
-->
LPAR2RRD_AGENT_DAEMON_PORT=9162
./load.sh daemon_stop
./load.sh daemon_start
You should see new port in listening state now
netstat -an | grep 9162| grep -i listen
tcp 0 0 0.0.0.0:9162 0.0.0.0:* LISTEN
ss -an | grep 9162| grep -i listen # on newer systems where netstat is not available
- Direct OS agent to that new port, change crontab entry on the OS agent side
su - lpar2rrd
crontab -e
* * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-host> > /var/tmp/lpar2rrd-agent.out 2>&1
-->
* * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-host>:9162 > /var/tmp/lpar2rrd-agent.out 2>&1
You can even direct OS agent to more servers (LPAR2RRD and XorMon, just add new host into the crontab)
su - lpar2rrd
crontab -e
* * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <XorMon-host> <LPAR2RRD-host>:9162 > /var/tmp/lpar2rrd-agent.out 2>&1