-
Notifications
You must be signed in to change notification settings - Fork 39
Getting started
CollectdWin is a MS Windows service which comes with a MSI installer. Follow these instructions to download, install, configure and start the service.
Download the latest version of CollectdWin MSI installer from releases page.
Make sure you have privileges to install software on your machine. Run the MSI installer that you downloaded from the previous step. This will install and start the service.
Configuration for CollectdWin is done via app.config. The default location of this file is C:\Program Files\Bloomberg LP\CollectdWin\CollectdWinService.exe.config. Whenever this config file is updated, make sure to stop and start the CollectdWin service, so that the new configuration settings are applied.
All the configuration elements for CollectdWin should be within CollectdWinConfig section
<CollectdWinConfig>
...
</CollectdWinConfig>
<GeneralSettings Interval="30" Timeout="120" StoreRates="false" />
Name | Description |
---|---|
Interval | Interval controls how often metrics are collected. Interval is defined as number of seconds, the default is 30 seconds. |
StoreRates | Determines whether or not COUNTER, DERIVE and ABSOLUTE data sources are converted to a rate (i.e. a GAUGE value). If set to false (the default), no conversion is performed. Otherwise the conversion is performed using the internal value cache. |
Timeout | If a metric was not updated within Timeout seconds, then it is considered missing and it is removed from the internal cache, default is 120 seconds. |
HostName | (Optional) Specifies the server's HostName. If set, it will be used in plugins. |
Plugin Registry contains the list of plugins with the class that has the plugin implementation. Plugins can be enabled or disabled individually. Each plugin might need it's own configuration, refer plugins page to configure each plugin.
<Plugins>
<Plugin Name="Statsd" Class="BloombergFLP.CollectdWin.StatsdPlugin" Enable="true" />
<Plugin Name="WindowsPerformanceCounter" Class="BloombergFLP.CollectdWin.WindowsPerformanceCounterPlugin" Enable="true" />
<Plugin Name="Amqp" Class="BloombergFLP.CollectdWin.AmqpPlugin" Enable="false" />
<Plugin Name="Console" Class="BloombergFLP.CollectdWin.ConsolePlugin" Enable="true" />
</Plugins>
CollectdWin uses NLog for logging. Refer to the NLog documentation for more info. There are 6 log levels (Trace, Debug, Info, Warn, Error and Fatal). The default configuration for nlog has defined the following:
- File - the location of the log file. Default value is C:\ProgramData\CollectdWin\CollectdWin_debug.log
- EventLog - Error or Fatal levels are logged into the eventlog and can be viewed using Windows Event Viewer.
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true" throwExceptions="false">
<variable name="appName" value="CollectdWin" />
<targets async="true">
<target xsi:type="File"
name="default"
layout="${longdate}|${level:uppercase=true}|${logger}: ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}"
fileName="${specialfolder:CommonApplicationData }\${appName}\${appName}_debug.log"
keepFileOpen="true"
ConcurrentWrites="false"
archiveAboveSize="1048576"
archiveFileName="${specialfolder:CommonApplicationData }\${appName}\${appName}_debug_${shortdate}.{##}.log"
archiveNumbering="Sequence"
archiveEvery="Day"
maxArchiveFiles="10" />
<target xsi:type="EventLog"
name="eventlog"
source="${appName}"
layout="${message}${newline}${exception:format=ToString}" />
</targets>
<rules>
<logger name="*" writeTo="default" minlevel="Info" />
<logger name="*" writeTo="eventlog" minlevel="Error" />
</rules>
</nlog>
CollectdWin runs as a Windows service, to start and stop follow these steps:
- Open services - click Start, click Control Panel, double-click Administrative Tools, and then double-click Services.
- Scroll down and select CollectdWinService
- Right click and click start or stop
- If start and stop menu are grayed, then check if you have privilege to start and stop a service.