Once you installed Foglight on a Unix machine, you might want the Foglight processes to start/stop automatically when you reboot the machine. This is not difficult to do and the Foglight installation includes already init.d-styled scripts which can be used. As Unix machines are often customized, the scripts are model scripts and provide the basic required functionality. You might need to customize the scripts further so involve your Unix Administrator to have the expert on board or involve our Professional Services Team to get the scripts customized.

So let's start - where to find the scripts?

The scripts are located in your Foglight installation folder under "scripts/init.d". You will find folders for AIX, HPUX, Linux, RedHat, Solaris10, Solaris8-9 and SuSE. For all this Unix types we have scripts available. And you will find a readme.txt which provides a short instruction:

My test machine is a RedHat Linux. In the RedHat folder you will find two scripts: foglight and foglight-FMS. Script foglight-FMS is the one you need to start and stop Foglight Server as a daemon. The script foglight is for Foglight agents and not needed at the moment.

The script foglight-FMS looks pretty much like any other init.d scripts you might have on your machine already. It can take the command line parameters "start | stop | restart" and based on the chosen parameter Foglight will be stopped, started or restarted.

To get the script running properly on your machine, please modify the line:

FOGLIGHT_BIN='@@FOGLIGHT_HOME_PATH@@/bin/fms'

On my machine Foglight is installed in "/opt/foglight/5758" so I changed the line to:

FOGLIGHT_BIN='/opt/foglight/5758/bin/fms'

Next step is now: copying the script foglight-FMS from "$FMS_HOME/scripts/init.d/" to "/etc/init.d/"

And finally you need to add the scripts to the needed rc*.d directory. Easiest way to do this, is use the chkconfig tool. In the foglight-FMS script you will find the needed chkconfig details added. Please modify them as needed, that they fit in your setup:

## Stuff for redhat chkconfig
# foglight-FMS    Start/Stop the Foglight Management Server
#
# chkconfig: 345 27 73
# description: Foglight Management Server
# processname: fms

If you do not modify, the chkconfig tool will create a start script in rc3.d, rc4.d and rc5.d. While the stop script will be created in rc0.d, rc1.d, rc2.d and rc6.d.

chkconfig --add foglight-FMS

This is how it looks like, when you use the default settings:

 

To remove the scripts from the rc*.d folders run:

chkconfig --del foglight-FMS

 

Now you want to do the same for your external Foglight Agent Manager - see this blog post.

Anonymous
Related Content