Agent Based Discovery

Device42 Discovery Agent

There exist special situations in which an agent simply makes more sense, and for that reason, we offer optional auto-discovery agents for many platforms (see “Supported Platforms” below).

Some situations simply cannot be discovered agentlessly either because they are unreachable from the network, or because certain rules don’t permit traffic flow. These special cases, and other security-hardened uses that may prove difficult otherwise are cases for which we recommend customers utilize agents. Note you are free to deploy and use agents as you see fit, as agents provide equivalent functionality vs. Device42’s agent-less discovery, but we do recommend the majority of users stick with agent-less.

Discovery Account WARNING: Please do not set up an auto-discovery / scan using critical [production] account credentials! Please create a separate, dedicated account to use only for discovery

Doing so, depending on permissions granted & configured password policies could result in account lock-out, therefore causing an otherwise completely avoidable outage.

Supported Platforms

Device42 Auto-discovery agents are available for deployment on the following platforms:

  • Windows (32-bit)
  • Linux (32-bit)
  • FreeBSD (32-bit)
  • OpenBSD (32-bit)
  • Solaris Sparc
  • Windows (64-bit)
  • Linux (64-bit)
  • FreeBSD (64-bit)
  • OpenBSD (64-bit)
  • Mac

Installation

The client can be downloaded by going to Discovery > Agent Based Scans. Enter the URL as it will be accessed by the agent from the remote machine, and choose your platform: Windows, Mac, Linux, BSD, etc.

It can be run from the command line or can be scheduled using the relevant scheduling program per OS. When running the application, the following switches are available:

Switch Description
-collect-responses collects all shell commands responses to collected-responses.log
-debug prints the data being sent and result of post operation
-device-customer string default device customer
-device-object-category string default device object category
-device-service-level string default device service level
-device-tags string default device tags
-dry-run doesn’t do a post, just prints the data to be sent
-extended-logs enables extended logs
-hostname-precedence sets device name as new name to prevent creation of new device if only hostname was changed
-ignore-domain ignore domain
-ignore-ipv6 ignore IPv6 addresses
-ignore-local-ips string sets list of local IPs to ignore
-ignore-local-ports string sets list of local ports to ignore
-ignore-remote-ips string sets list of remote IPs to ignore
-ignore-remote-ports string sets list of remote ports to ignore
-ip-vrf-group string default IP VRF group
-light-mode reduces CPU utilization by cost of discovery speed
-quiet enables extended logs
-sudo-password string sudo password used in some OSes (Mac, Linux) to get information about the system
-version print version number and exit

Scheduling With Crontab in Linux

For best results we recommend running the command with sudo. Make sure that /home/system_dev42/bin/d42agent is owned by root with -rwx—— (0700) so that a non-root user system_dev42 cannot overwrite the agent, or just add it to root’s crontab (or cron.daily/hourly) and let root execute it.

Linux and Mac Note

After downloading, if the agent is not executable – make it executable (i.e., chmod +x agentname). Sudo is required for best results, and the password may be passed using –sudo-password=”password”.

Windows Note

After downloading the agent, use the Windows Task Scheduler to schedule the executable file (*.exe) to run at the intervals you want.

View Agent Version and Agent Last Check-in Date

The Devices list page now includes two columns that display the Agent Version and the Agent Last Check-in Date for devices discovered by the agent.

  • On the Devices list page, click the gear icon below the Advanced button to display the column list.

  • Select the Agent Version and the Agent Last Check-in columns.

  • If you want to define a new column view, type a name for the view in the field to the right of the Table Columns drop-down. Click Save to save the view. Device42 displays the agent information for devices discovered by the agent.

Filtering with Agent Columns

You can use Agent Version and Agent Last Check-in Date to filter the devices list to look for devices found by specific agents or during certain periods.

  • Click +More to add the columns as search criteria.

  • You can then click on the column name to use the column as a filter. For example, you can use Agent Last Check-in Date to search for devices discovered by an agent during a certain calendar period.

  • You can also use the Agent columns in Advanced search. For example, the query below searches for devices discovered less that 10 days in the past.