Archive for the ‘ Zabbix ’ Category

Monitoring Flexlm usage with Zabbix

Flexlm can be a hard thing to accurately measure and monitor. Luckily, the output from lmutil can be used to display . First thing to do is locate the lmutil binary and try to get it to run. I use Flexlm for autodesk on and ESRI on (centOS).

Windows:
This server seemed to want the license file specified. You may need to launch the GUI tool and watch the status bar for the path to it. This is what mine looked like:

"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a

Linux:

/home/esri/arcgis/license10.0/bin/lmutil lmstat -a

That will spit out the current license usage for all your products. To isolate the numbers we want to monitor, we will be piping the output into some other commands like find and cut.
I recommend using the for windows http://gnuwin32.sourceforge.net/. These examples use the built-in ‘find’ utility, and a ‘cut.exe’ tool i found googling around. I had overlooked the gnutools when I first set this up. My mistake can be your gain. With gnutools, it will be easy to isolate the output you want using ‘grep’ and ‘cut’. First, isolate the line you are looking for with grep. You will have to figure out what feature code you want to monitor. mine looks like this:

Windows:

"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a | find /i "64300acd_f:"

Linux:

/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO

now that you have the right line,  you can trim the extra characters with ‘cut’. It will take some experimentation to get it right.:

Windows:

"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a | find /i "64300acd_f:" | cut -c 62-64

Linux:

/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO | cut -c 59-61

The output now should be only the number of licenses being used.

To allow to monitor this value, we need to create a ‘UserParameter’ read up on it here: http://www.zabbix.com/documentation/1.8/manual/config/user_parameters. This is what the parameter looks like on my servers:

Windows:

UserParameter=licenses.autocad.used,"c:\program files\autodesk network license manager\lmutil" lmstat -c "c:\program files\autodesk network license manager\license\license.lic" -a | find /i "64300acd_f:" | cut -c 62-64

Linux:

UserParameter=licenses.arcinfo.used,/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO | cut -c 59-61

Once you have the userparameter created on the license server, restart the agent and add an item in zabbix to begin collecting values.

Zabbix 1.6 Proxy with Debian

I set up a today on a little VM. looks to work nicely. Intructions will be kept up to date on this page.

Uninstall MySQL 5 from Debian

I completely. completely messed up . Badly. I wiped out the data directory (/var/lib/ in ) and the went to remove
-get remove --purge mysql-server

That only deleted something like 86K. dissapointing. It looks like “mysql-server” is a shortcut pointing to the latest version of the software. The real software is found  under the name “mysql-server-50″. So what made it happen was:
apt-get remove --purge mysql-server*

That’ll wipe out whatever mysql install is in place.