How to configure Foglight Agent Manager to run as a daemon on a Unix Machine?

In my last blog I explained the steps which needs to be done to get the Foglight Management Server running as a daemon on Unix machines. The same can be done for the Foglight Agent Manager too and it is much easier than for the Foglight Server.

The needed scripts are located in your Agent Manager installation directory: "$FGLAM_HOME/state/default". Here you will find the scripts "fglam-init-script-installer.sh" and "fglam-init-script.sh":

You might wonder why you see only two scripts here, while for the Foglight Server you have scripts for each Unix type (AIX, HP, Linux…). When you download the Agent Manager installation package from the Foglight server, you select already the Unix type you are using. So each Agent Manager installation package contain only the script which is needed for the Unix type. In my example it is Linux Red Hat.

The script "fglam-init-script.sh" is the init script itself. It can take four command line options: start, stop, restart and status. Same like a lot of other init scripts.

Script "fglam-init-script-installer.sh" can take two command line options: install or remove. This shows already what you can do with the script. You can use it to install the init script into the init.d folder and create the symbolic links in the needed rc*.d directories or you can use it, to remove symbolic links and the init script.

To do these steps we are using the chkconfig tool. You can find the information for chkconfig in script "fglam-init-script.sh":

# Make an init script chkconfig(8) compliant. More recent versions of chkconfig will
# use the LSB stanza if it is also available
#
# quest-fglam:       Starts the FoglightAgentManager
#
# chkconfig: 235 99 01
# description: Starts and stops the FoglightAgentManager at boot time and shutdown.

Please adjust the settings that it matches your Unix configuration guidelines.

Now let's start with the installation!

To install you only need to run the script "fglam-init-script-installer.sh". Run the script a user root:

When looking at the init.d and rc*.d folders you will find the script and symbolic links created. The script called "dell-fglam":

The symbolic links are called "K01dell-fglam" or "S99dell-fglam":

For other Unix types you will find the installed scripts in:

    • AIX: /etc/rc.d/init.d
    • All Linux operating systems: /etc/init.d
    • HP-UX: /sbin/init.d
    • Solaris: /etc/init.d

If you want to remove the script and symbolic links run the installer script again as user root with the remove option:

./fglam-init-script-installer.sh install remove

Anonymous