Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

Latest commit

 

History

History
44 lines (38 loc) · 1.86 KB

EnableWatchdog.MD

File metadata and controls

44 lines (38 loc) · 1.86 KB

Enable Application Insight Traefik Watchdog

Note: The Watchdog Windows binary is downloaded along with Traefik binary by running the script $REPO_ROOT\Traefik\Scripts\Get-TraefikBinary.ps1.

  1. Add or uncomment the following lines in your /Traefik/ApplicationPackageRoot/ApplicationManifest.xml
<ApplicationManifest>
    <ServiceManifestImport>
        <ServiceManifestRef ServiceManifestName="Watchdog" ServiceManifestVersion="1.0.0" />
        <ConfigOverrides />
        <Policies>
          <RunAsPolicy CodePackageRef="Code" UserRef="AdminUser" EntryPointType="All" />
        </Policies>
  </ServiceManifestImport>
  ...
  <DefaultServices>
    ...
    <Service Name="Watchdog" ServicePackageActivationMode="ExclusiveProcess">
      <StatelessService ServiceTypeName="WatchdogType" InstanceCount="[Traefik_InstanceCount]">
        <SingletonPartition />
      </StatelessService>
    </Service>
    ...
  </DefaultServices>
  ...
  </ApplicationManifest>
  1. Copy your Application Insights instrumentation key in into the placeholder __YOURKEYHERE__ in /Treafik/ApplicationPackageRoot/Watchdog/ServiceManifest.xml
      <ExeHost>
        <Program>traefik-appinsights-watchdog.exe</Program>
        <Arguments>--appinsightskey=__YOURKEYHERE__ --watchdogtestserverport=29001 --pollintervalsec=60 --debug=true</Arguments>
        <WorkingFolder>CodePackage</WorkingFolder>
        <!-- Uncomment to log console output (both stdout and stderr) to one of the
             service's working directories. -->
        <!-- <ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048" /> -->
      </ExeHost>
  1. Optional Review, add or adjust any arguments (i.e.: credentials to call Traefik's "/health" endpoint). For full details on the watchdog see it's repository here