5 Replies Latest reply on Sep 9, 2019 2:09 PM by Chase Colvin

    For Any Having Trouble Installing And Configuring Patrol Agents On Linux Hosts...

    Chase Colvin
      Share This:

      UPDATE: In TSOM 11.3.02 and up, the Patrol agent will be installed as a service on Linux by default. So steps 13 and 14 apply only to TSOM 11.3.01 and prior versions.


      Hey all,


      My team and I are far from being Linux gurus of any kind. We know enough to get by, and our google-fu is strong, but none of us would cut it as a Linux administrator. As such, we were having trouble getting our Patrol Agent installed and running as a service on one of many RHEL 7 hosts we have been inducting into TrueSight. After a lot of forum crawling, engaging with support, and trial and error, we have compiled some instructions that may prove to be helpful for any who have experienced the same frustrations we have.


      Any feedback or corrections are welcome. The idea here is to make relatively clear instructions available to any who need them in the future.


      DISCLAIMER: These instructions do not come with any guarantees, and I strongly recommend that you have at least some familiarity with bash before attempting to follow them. Also, in any case where a full path is given for a script that needs to be run, you will either want to "cd" to that directory, the run the script with a "./", or run it using the full path using "bash -c 'script path and parameters here' ". Again, this comes back to having some basic familiarity with bash.



      To install the patrol agent and enable it to run as a service:


      1)   Create a service account for the agent, and set the umask for that user to 0022. If possible, "root" should also have a umask of 0022.
      (From here on, that account will be referred to as "patrolagent", but yours can be named whatever makes sense to you.)


      2)  Copy Patrol Agent tar file downloaded from the Presentation server to "/home/patrolagent".

      (The location matters little, as long as your service account has full access to the folder.)


      3)  Run "chown -R patrolagent:patrolagent" on the Patrol Agent tar file to change ownership to "patrolagent".

      (Either log in as the service account directly, or "su" to that account from your own. e.g. "su patrolagent")


      4)  Extract files from tar file in "/home/patrolagent".
      (Or wherever you placed the tar file in step 2. Command to extract from tar file is "tar -xzvf TargetFileName". Make sure you are currently in the directory you want the files to be extracted to.)


      5)  Create the directory "/opt/bmc". "patrolagent" should be the owner of "/opt/bmc" with 755 permissions.
      (Look up "chown" and "chmod" commands for details on taking ownership and setting permissions, if needed.)


      6)  Run "/home/patrolagent/RunSilentInstall.sh" as "patrolagent" to initiate install.

      (As mentioned in the disclaimer, either "cd" to "/home/patrolagent" then run the script with "./RunSilentInstall.sh", or call script with the full path by running "bash -c '/home/patrolagent/RunSilentInstall.sh' ".)


      7)   "cd" to /opt/bmc/Patrol3, and then run ". ./patrolrc.sh" as "root".


      8)  Run "mkdir -p /etc/patrol.d/security_policy_v3.0" as root, to create a directorty for the security config to be stored.


      9 a)  Run "/opt/bmc/Patrol3/agent_configure.sh -d" as "root" to set permissions and ownership of PATROL binaries.

      (Same conditions apply as the step above. Either "cd" to "/opt/bmc/Patrol3" and run "./agent_configure.sh -d", or run "bash -c '/opt/bmc/Patrol3/agent_configure.sh -d' ".)


      9 b)  If root password was not specified in the package, and the package was set to not override security settings, run "/opt/bmc/common/security/config_v3.0/sec_configure.sh /opt/bmc/Patrol3 0" as "root" to set security settings.

      (In this case, you must "cd" to "/opt/bmc/common/security/config_v3.0" and run "./sec_configure.sh /opt/bmc/Patrol3 0". Ensure you run this script as "root". This assumes you are running security level 0.)


      10) Change ownership of "/etc/patrol.d" recursively to "patrolagent" and grant recursive 755 permissions to that folder.

      (Look up "chown" and "chmod" commands for details on taking ownership and setting permissions, if needed.)


      11)  Find the install log directory and run the rootscripts configuration script:

              - "cd /opt/bmc/log/<date and time of install>_install"

                example: "cd /opt/bmc/log/2019_04_22_18_31_52_install"


              - Run the *rootscripts script. The file name will vary by host. See the following pattern: "sh <hostname>.<domain>_<port>_install.log_rootscripts"

                example: "sh rhel7testvm1.localdomain_3181_install.log_rootscripts"


      12)  Run the following commands and scripts as "patrolagent" to stop and set important parameters for the Patrol Agent.

               - "/opt/bmc/Patrol3/scripts.d/S50PatrolAgent.sh stop"


               - "cd /opt/bmc/Patrol3/"


               - ". ./patrolrc.sh"

      (Must be done in that order because the script uses "pwd" to set a variable, which needs to be "/opt/bmc/Patrol3/". The first "." must be included to ensure the scripted is sourced from the current shell to set the environment variables appropriately. Can also be run like "source ./patrolrc.sh".)


      13)  Next, create a file named "patrolagent.service" in "/etc/systemd/system", the file must have the following contents :

      (Can also be created in /usr/lib/systemd/system, then symlinked to /etc/systemd/system)



      Description=BMC Patrol Agent: Port 3181

      After=network.target syslog.target local-fs.target centrifydc.service





      ExecStart=/opt/bmc/Patrol3/scripts.d/S50PatrolAgent.sh start 3181

      ExecStop=/opt/bmc/Patrol3/scripts.d/S50PatrolAgent.sh stop 3181








      14)  After creating that file, run "systemctl enable patrolagent" and then "systemctl start patrolagent".







      If you have to completely uninstall the Patrol Agent:


      1) Uninstall it using script "/opt/bmc/Uninstall/uninstall.sh -silent all_kms'.


      2) Delete all the content in "/opt/bmc"


      3) Delete "patrol.d" folder in "/etc" directory.


      4) Delete the Patrol Agent service file, if it exists. Could be in /etc/systemd/system, and/or /usr/lib/systemd/system.






      NOTE: The setup described above is only for installations in which there is only one Patrol Agent on the target host. A Linux savvy individual could easily make multiple services to run more than one on a host. However, if further guidance is needed, BMC has a Knowledge Article outlining the process. That KA is not public at this time, so I am unable to provide a direct link. Support should be able to assist with getting that information until it is made public.