Assembly will be required. You will need to look at the scripts in each of the steps and adjust accordingly to your test environment. As always, test in your test environment.
From time to time, I am finding myself either standing up a new Linux box in my environment or helping customers with deploying the Linux agent install files and walking them through the process of signing the certificates. So, I thought, why not automate this, and make it a repeatable process. To Orchestrator we go.
Below is the runbook I used in my lab environment to accomplish this.
What you will need:
- Downloads: plink and pscp are available here. These will be used to transfer files and connect to the Linux agent.
- $linuxUsername = A variable for the Linux username”
- $linuxPassword = “A variable for the Linux username password”
- $Target = “This is the fqdn that is first step that must be entered.”
- Shares to store your Linux Certificates for the original and signed certificates
Initialize Data – this is the name of the Linux server. You will Need to put in the FQDN as this field is called later in the scripts for the file naming.
- Check Machine Is Online – This is just a simple script (not my own) that I came across that check to see if the server is online and reachable
- Accept Client Key – This is just a simple script (not my own) to ensure the unique key of a new plink target is accepted.
- Create SCOM Agent Folder – Creates the scomagent folder under /tmp
- Copy SCOM installation Files – This contains the filename of the Linux agent. This step will need to be updated when the agent files are updated. Example: scx-1.6.10-2.universalr.1.x64.sh
- Install SCOM sh file – Installs the Linux SCOM agent file.
- Transfer cert from Linux to MS – Transfers a copy of the local SCOM agent certificate that will be signed.
- Sign Linux Certificate – Signs the Linux certificate for communication with SCOM
- Copy the New Certificate – Copies the signed certificate over to the Linux agent.
- Rename old certificate – Renames and keeps the old cert.
- Rename new certificate – Renames the new certificate to the original name. This is needed for the agent to communicate with SCOM.
Restart the agent – Restarts the scxadmin service for the certificate to be used.
That’s it. Your Linux box is now ready for discovery in SCOM.
Download the Runbook here.
THE SOFTWARE IS PROVIDED “AS IS”, AND WITHOUT WARRANTY OF ANY KIND.