logo

NJP

Discovery with Agent Client Collector - Step by Step Configuration

Import · Mar 29, 2022 · article

This Article helps you to understand the concepts of Agent Client Collector and how it can be used in real time with an example. Normally, the Discovery is an Agent Less connection and discovers based on the configured schedules, Patterns & Credentials.

The Horizontal Discovery sometimes may not be able to connect/reach to all your Infrastructure Machines/Servers. It is ideal to use ACC on these kind of Machines where your normal discovery is not reachable and discoverable.

Note: I have used Windows based MID Server. For others, the configuration will be different i.e. if you are using any Linux/Unix Machine as a MID, you need to follow the MID Server setup differently. Follow the below reference.

MID Server Installation in Linux

Pre-Requisites

  • 2 EC2 Instances from AWS.
  • One EC2 Instance for MID Server
  • One for Agent Client Collector i.e. install the ACC in this machine to capture the information into your Servicenow Instance via MID Server
  • One Personal Servicenow Instance (Quebec/Rome/Sandiego)

Note: Amazon gives you a 1 year free subscription, but you need to make sure you are using free tier EC2 Instances only in order to make sure it will not cost you / send you the bills to pay. After this configuration, please terminate these instances from your AWS console

Agent Client Collector Plugins

  • Install the below plugins in your personal instance
  • * Discovery
    • Agent Client Collector for Visibility
    • Agent Client Collector for Framework

Before you begin

  • Personal Instance with probably choose Rome/Sandiego
  • MID Server Installation
  • * A MID Server (Windows 2019 / equivalent)
    • * For this, you can choose AWS EC2 Instance free tier version if you have
      • Otherwise, make some server machine of your own
    • Create a MID User in your instance and provide the role for this user as mid_server
    • Install Powershell latest version in your MID Server.
    • Open your instance url (https:.service-now.com) from your server
    • On the Filter Navigator ⇒ MID Server ⇒ Downloads ⇒ Download Windows MSI File
    • Once you download the file, start your MID Server installation

MID Server Installation Steps

  • Copy your instance url, provide the mid server user that you have created in your instance and Test your connection

image

image

  • Once you successfully test your connection click “Next”. Now, Click on (+) and create a service account in your MID Server. Note: This will create a local user in your MID Server. Provide a name for your MID Server, Click on Validate MID Service Settings and make sure it is valid

image

image

  • Complete your installation & it will create a record in your instance once you complete and start the service. Now, Validate the MID Server and make sure your MID Server is Up & Running

image

Enable Firewall Settings in MID Server

  • Open Windows Defender Firewall with Advanced Security
  • Click on “Inbound Rules” as shown below and create a new rule to allow inbound port 8433 (This is the default port for Agent Client Collector)
  • Also, Enable the below rule

image

image

ACC Agent Download & Installation

  • Goto your other EC2 Instance that you are prepared for ACC
  • Open the Servicenow Instance URL from here and on the Filter Navigator,
  • Goto Agent Client CollectorDeploymentMID Servers ⇒ Open the MID Server
  • Under the Related Links, Click on Setup ACC Listener. This will create the endpoint like below

image

  • Goto Agent Client Collector ⇒ Deployment ⇒ MID Web Server. You can see the entry here.
  • Goto Agent Client Collector ⇒ Deployment ⇒ Websocket Endpoint. You can see the entry here as well
  • Goto Agent Client Collector ⇒ Deployment ⇒ MID Web Server API Key. Create an entry here like this

image

  • Here click on “View API Key” under Related Links and copy the API Key once you created it.
  • Start your installation on your machine where you wanted to install the agent client collector by downloading from Agent Client Collector ⇒ Deployment ⇒ Agent Downloads
  • Provide the below information (Ipaddress, Port, API Key that was copied from your previous “View API Key”. Select the defaults for next steps and complete the installation.

image

image

Once you have successfully installed the Agent Client Collector, do this

Agent Client Collector Configuration on the Machine

  • Open the installation folder (C:\Program Files\ServiceNow\agent-client-collector) and make sure it has bin, embedded etc., folder are there
  • Install Powershell in this Machine as well
  • Go to Local Users from control panel of this machine. Servicenow user account will be created like this

image

  • Make sure the Agent client collector service is running using the local account (servicenow) that was created while performing the ACC installation.

image

  • Now, open C:\ProgramData\ServiceNow\agent-client-collector\config\acc.yml file from this Machine and configure the below. (ProgramData folder is a hidden folder, so you can choose the windows explorer options to show this folder)
  • * name = (You can provide a custom name of your own choice
    • backend-url = ws://:/ws/events (Copy the Websocket Endpoint from your instance under ACC -> Deployment -> Websocket Endpoint record)
    • api-key = (Your Instance ⇒ ACC -> Deployment -> MID Web Server API Key -> Select the record -> Under the Related Links -> View API Key - > Copy and paste here
  • Close the file , Stop the ACC Service and start the ACC Service
  • Open the yml file again and observe the api-key is encrypted / not. It will encrypt the api-key value like this (example)
  • * “encrypted:FQRRuoZ8anhsWeaIJSm6bkzCYZPbitLqaKqjKRgONB/+G9mBXARKPlDRj6O57/QW”
  • Now, you are ready to test this

Performing the Self Test for ACC

  • Goto Command prompt (Run as Administrator)
  • Goto C:\Program Files\ServiceNow\agent-client-collector\bin
  • Type “acc self-test”(If you observe the MID connected via Websocket and not with the HTTPS which is fine as per our configuration. Make sure all the tests are getting "PASS")

image

Now, that you have started the ACC Service on this machine, you will be able to see the Agents in your instance like this (Agent Client Collector ⇒ Agents)

image

Open the above record and click on "Collect host data" button. Now, it starts collecting the data from this machine and creates CI Record.

image

image

You can observe the Running process, Software Installation, Network Adapters, Serial Numbers etc., records as well under the related links of the above CI Record.

Note: This is a basic setup of ACC on one Machine. In order to install this on multiple Machines, Servicenow has given the steps to bundle as a package.

Install ACC - Mass Deployment

Other Settings/Basic Trouble shooting steps

  • In order to grab the Software Installation of any ACC Machine, make sure you configure and Publish with your own conditions (Agent Client Collector ==> Configurations ==> Policies)
  • In order to cross check whether the OOTB definitions are working properly, Go to Agent Client Collector ==> Configurations ==> Check Definitions ==> Under Related Links ==> Click on "Test Check" and provide the relevant CI. If you are getting the response properly, then the definition is working fine.
  • Under Related Links of each Agent record, you have an option to trouble shoot what happened with that agent by clicking on "Recent ECC Queue". You can observe the "input" ECC record XML to see what data is getting

Please feel free to reply back if you have any queries.

Thanks,

Narsing

View original source

https://www.servicenow.com/community/itom-articles/discovery-with-agent-client-collector-step-by-step-configuration/ta-p/2324008