Common .NET Agent Settings

Configure the .NET Agent settings that are common for both Windows services and IIS applications.

Configure access tokens for .NET Agents

Access tokens are required for the authentication of Agents to the Seeker server. You can configure access tokens for either all or specific projects.

The following entry defines the same token for all the projects. For the value attribute, supply a value generated for Agent authentication, as described in Configure Access Tokens.

<seeker>
  <settings>
    <accessTokens>
      <!-- accessToken for all projects -->
      <accessToken value="8j0m4amrid0a1bi4820q08sdfbou0uq3igelev">
    </accessTokens>
  </settings>
</seeker>
To configure different access tokens for specific projects, define separate accessToken elements with the following values:
  • value: An access token value generated for Agent authentication.
  • projects: A comma-separated list of project keys.
<seeker>
   <settings>
     <accessTokens>
       <!-- accessToken for default project -->
       <accessToken value="ug144vmdu91bpaicqvvvoes4t030rhd2gc7pk3duu0vaboo7lnu0" projects="default">
       <!-- accessToken for myproject1_key and myproject2-key projects -->
       <accessToken value="8j0m4amrid0a1bi4820q08sdfbou0uq3igelev" projects="myproject1_key,myproject2_key">
       <!-- accessToken for all other projects -->
       <accessToken value="uhq10654qd1uhfk14r3r3biigv1l5mfjcn65ecv88832d3gi8r40">
     </accessTokens>
   </settings>
</seeker>

Configure a Web proxy

If an Agent communicates with the Seeker server using a proxy, you can configure this proxy by setting the proxyUrl attribute:

<seeker proxyUrl="http://proxy-server:8888">
</seeker>

If the proxy server requires authentication, supply user credentials:

<seeker proxyUrl="http://proxy-server:8888" proxyUser="myName" proxyPassword="myPassword">
</seeker>

Modify default project mapping

You can instruct an Agent to use a certain project as default for all application pools and Windows services that are not mapped to any specific projects, and report detected vulnerabilities to that project. The following example defines my_project_key as the default project.

<seeker <seeker project="my_project_key">
</seeker>

Control which processes to monitor

By default, an Agent would monitor all the processes running under IIS or as Windows services. You can define which of the processes to include in or exclude from monitoring.

  • In the process.includes attribute, define regular expressions to monitor only matching processes. Regex values are case-insensitive.
    <seeker>
      <misc>
        <add key="process.includes" value="(.*MyApplication\.exe.*)|(.*w3wp\.exe.*)" />
      </misc>  
    </seeker>
  • In the process.excludes attribute, define regular expressions to exclude the matching processes from monitoring.
    Note: The process.includes setting overrides the process.excludes setting.
    <seeker>
      <settings>
        <misc>
          <add key="process.excludes" value="(.*MyApplication\.exe.*)|(.*w3wp\.exe.*)" />
        </misc>
      </settings>
    </seeker>
Note: You can also include or exclude processes running under IIS, as described in Control which IIS processes to monitor.

Monitor applications concurrently with other .NET profilers

Enable profiler chaining to monitor an application concurrently with other profilers for .NET, such as application performance monitoring (APM) tools, running on the same machine.

Make sure that an APM tool is running on the same application server with an Agent, and add the profilerChainingEnabled="true" attribute.

<seeker profilerChainingEnabled="true">
</seeker>

Change log retention period

By default, the Seeker .NET Agents service keeps log files in the dedicated folders for 7 days. You can change this period by setting the logMaxRetentionDays attribute to the required number of days:

<seeker logMaxRetentionDays="10">
</seeker>

Disable Agent autoupdate

By default, when the Seeker .NET Agents service is restarted, it checks if a newer version of an Agent is available on the Seeker server, and if so, it downloads and installs it. This behaviour can be disabled by setting the autoUpdateEnabled attribute to "false":

<seeker autoUpdateEnabled="false">
</seeker>

Delay monitoring until after application startup

By default, the monitoring of applications by .NET Agents starts immediately once they are ready, which might impact application performance during startup. To allow applications to complete their startup without this impact, you can configure a delay of the monitoring by a number of seconds after an Agent is ready.

Note: This setting applies to all the applications and .NET Agents configured in the current dotnet-agent.config file.

The following example defines a delay of monitoring by 35 seconds.

<seeker>
  <settings>
    <misc>
      <add key="instrumenter.delayed" value="default"/>
      <add key="instrumenter.delayed.delay" value="35"/>
    </misc>
  </settings>
</seeker>
Note:

Should you need further guidance regarding this option, please contact support.