Last updated: 2024-10-28
1\. Introduction
2. Basic Architecture of Agent
3\. How the Discovery Agent Establishes Communication with Freshservice
4. Installation & Uninstallation of Discovery Agent
5. What information does the Agent fetch
6\. How the Agent fetches information
7\. Services
Introduction
The Discovery Agent effortlessly collects hardware and software data from an asset, ensuring that Freshservice consistently updates the asset inventory without requiring any additional effort from end users.
With the Discovery Agent installed on devices, the Freshservice asset inventory dynamically updates whenever there is a change, providing a streamlined and efficient approach to maintaining accurate and up-to-date asset information.
Basic Architecture of Agent

How the Discovery Agent Establishes Communication with Freshservice
Integration Setup Process:
Agent Registration
Upon installation, the Discovery Agent automatically registers with Freshservice. It communicates with two crucial components: the Registration Key and the Access Key.
Authentication
Freshservice validates the Discovery Agent Registration Key using a secret hash. Successful validation leads to agent registration and the generation of an Access Key for authentication purposes.
Post-Registration Actions
Scanning and Updates
Following registration, the system conducts comprehensive scans to gather essential data. It also schedules regular updates, ensuring the system remains up-to-date with the latest features and patches.
Installation & Uninstallation of Discovery Agent
Installation:
The Freshservice Discovery Agent can be installed on Windows, Mac and Linux based systems. Refer to the links below for additional information on installing discovery agent on Windows, Mac and Linux.
https://support.freshservice.com/en/support/solutions/articles/223635-installing-discovery-agent-win- https://support.freshservice.com/en/support/solutions/articles/199849-installing-discovery-agent-win-in-a-domain-using-gpo- https://support.freshservice.com/en/support/solutions/articles/199805-installing-discovery-agent-win-in-a-workgroup-using-psexec-
Default installation paths:
Uninstallation :
The discovery agents installed can be uninstalled directly from Freshservice Portal. The link is included below for reference.
What information does the Agent fetch
Laptops and Desktop Computers
Software Applications
How the agent fetches information
The Agent utilizes WMI (Windows Management Instrumentation) Queries to retrieve data from Windows machines, while it executes shell commands to fetch information from Linux and Mac machines.
Windows:
We use following WMI tables to fetch details from agent installed machine.
Software details will be fetched from Registry only for Machine specific softwares by the Agent and both 32 and 64 bit software details will be fetched by the agent.
Enter scanned details will be stored in JSON format in a text file (scan-data.txt)
Mac:
Following are the Mac commands used by agent:
Linux:
Following are the Linux commands used by agent:
Files read by agent:
In the above commands, dmidecode and ifconfig are the commands which need sudo privilege. So a sudo user with the privilege to execute the dmidecode and ifconfig commands will suffice to discover Linux devices.
Services
Windows:
The Discovery Agent operates as a service on Windows. Users can start, stop, and restart the agent service manually. Upon installation, the service starts to perform background operations. Before uninstallation, the service is gracefully stopped to halt the agent's activities. The service is configured to automatically restart in response to exceptions or errors.
Mac and Linux:
On Mac, the scan is initiated by the daemon specified in '/Library/LaunchDaemons/freshservice.agent.daemon.plist'. In Linux, the scan task is triggered by the cron job named '/etc/cron.d/FSAgentCron'. Commands can be used to force the agent to perform specific operations.