Established Member.. marcin.malicki@
Established Member..
732 views

How to register Logger as a service on Software Logger (non-root user installation)

Hi folks,

Many customers and engineers asked me on how to register Software Logger as service.

While for the root installation it's pretty simple and can be accomplished with the following command:

/opt/current/arcsight/bin/arcsight_service enable

(Of course the above path depends on where the Logger was installed.)

However, for non-root installation it may require some manual steps.

The easiest way would be to use my script (please see the attachments).

The steps are as follows (to be done as root user):

  1. Copy the script to /etc/init.d on your Linux box

  2. Edit the file e.g. vi /etc/init.d/arcsight_logger
  3. Inside the file there are two variables which may require an update: USER and LOGGERD
    The first one is basically the user which was used for the Logger installation (default is "arcsight"). Second one is the path where loggerd resides.
    In case you don't know where is your loggerd file located, you may use find command for instance:
    find / -type f -name loggerd

    Anyway, the default settings in the script look like this:
    USER="arcsight"
    LOGGERD="/opt/arcsight/current/arcsight/logger/bin/"

  4. Make sure the script has executable rights e.g.
    chmod +x /etc/init.d/arcsight_logger

  5. Add the actual service this way:
    chkconfig --add arcsight_logger

  6. Enjoy the service command as root:
    To start Logger services: service arcsight_logger start
    To stop all Logger services: service arcsight_logger stop
    To check the status of Logger services: service arcsight_logger status

  7. With default settings applied, Logger will now start automatically during the boot up. If you don't want that, you can simply disable it with chkconfig command:
    chkconfig arcsight_logger off

Any questions or comments are very welcome.

Regards,

Marcin

3 Replies
Honored Contributor.. Karlo_Luiten Honored Contributor..
Honored Contributor..

Re: How to register Logger as a service on Software Logger (non-root user installation)

Does this method work better with systemd now?

Currently logger on RHEL7 shows as 'failed' in systemctl.

0 Likes
Established Member.. marcin.malicki@
Established Member..

Re: How to register Logger as a service on Software Logger (non-root user installation)

Hi Karlo,

It's a good point which you raised and it requires a bit of clarification from my side.

The script is generally designed for Sysvinit (not systemd) which is still compatible with RHEL7.

My intention was to create something which is universal and works on both systems (RHEL6 and RHEL7).

Per my post I would use chkconfig to manage it.

Does "chkconfig --list" give you also the status as "failed"?

Also, I am bit surprised that you see as "failed" in systemd.

For me it looks like follows:

[root@loggervm6 ~]# systemctl status arcsight_logger.service

arcsight_logger.service

   Loaded: loaded (/etc/rc.d/init.d/arcsight_logger)

   Active: active (exited) since Tue 2016-10-25 17:36:29 +03; 23h ago

  Process: 780 ExecStart=/etc/rc.d/init.d/arcsight_logger start (code=exited, status=0/SUCCESS)

Oct 25 17:32:22 loggervm6 su[783]: (to arcsight) root on none

Oct 25 17:32:26 loggervm6 arcsight_logger[780]: Starting logger daemon...

Oct 25 17:32:28 loggervm6 arcsight_logger[780]: Starting all components...

Oct 25 17:36:29 loggervm6 arcsight_logger[780]: ..................................................

Oct 25 17:36:29 loggervm6 arcsight_logger[780]: Logger started successfully.

Oct 25 17:36:29 loggervm6 systemd[1]: Started arcsight_logger.service.

Is it possible that the script is missing the executable permissions?

For instance:

chmod +x /etc/rc.d/init.d/arcsight_logger

Regards,

Marcin

0 Likes
Honored Contributor.. Karlo_Luiten Honored Contributor..
Honored Contributor..

Re: How to register Logger as a service on Software Logger (non-root user installation)

Thanks for your reply.

If I find the behavior again I will let you know. What happened was: I rebooted a Logger machine, and the logger service would start fine, only it would maybe in some way not report back correctly to systemd and show failed. A systemctl restart  arcsight_logger.service would run within a second and fix it.

Will let you know what I find. Thanks for the write-up.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.