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 "" and "":

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 "" 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 "" 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 "":

# 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 "". 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:

./ install remove

  • Some Foglight agents, such as the AIX and HP system agents that come included with the
    OS Cartridge, require root-level privileges to run on Unix. This can be accomplished by
    making sure that the user account used to install the Foglight Agent Manager on the
    monitored host does not appear in the sudo configuration file. However, if the Foglight Agent
    Manager does not have root-level privileges, the agents that require those privileges fall back
    to normal, non-root launch. Starting those agents without root privileges does not prevent
    them from activating and collecting data.

  • SysV init scripts to systemd?

    Example, in Ubuntu 16.04, no longer using init.d scripts but Systemd. For Systemd to include the agent manager daemon startup.

    After fglam installation, you were asked to customize your init script. This will generate the following script under <fglam-home>/state/default/ then to install this script:

    sudo ./ install

    This will create a script: /etc/init.d/quest-fglam. Run as follow:

    sudo /etc/init.d/quest-fglam stop
    sudo /etc/init.d/quest-fglam start

    This will create a temporary systemd script for quest-fglam.
    You just need to install systemd script to make it persistent by running:

    sudo systemctl enable quest-fglam

  • SysV init scripts to systemd in Ubuntu?

Related Content