Conky to Monitor WLS Managed Servers
- by John Graves
I've been using a little utility on my linux-based machines for years called conky. It can be used to monitor system resources, but I wanted to modify it to monitor my WebLogic managed servers too.
Once installing conky, you'll need to update the .conkyrc file. Here is a simple example.
Basically, the important lines are these:
- Admin (7001) ${if_empty ${exec /usr/sbin/lsof -i :7001 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 7001 7001 count}) ${endif}
- OSB (8011) ${if_empty ${exec /usr/sbin/lsof -i :8011 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 8011 8011 count}) ${endif}
- BAM (9001) ${if_empty ${exec /usr/sbin/lsof -i :9001 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 9001 9001 count}) ${endif}
- DB (1521) ${if_empty ${exec /usr/sbin/lsof -i :1521 | grep LISTEN}}${color red}DOWN${color} ${else}${color green} UP ${color}(${tcp_portmon 1521 1521 count}) ${endif}
It uses lsof to find out if ports are in use.
Here is a video showing it in action.