Installation - Agent
Windows
Section titled “Windows”We will install Prometheus as an agent. That means it will not store locally long term data, but
only temporary, until they get send to the server defined in the remote_write block in the configuration.
Agent will scrape metrics from local exporters and then send the data to the remote server.
-
Create configuration file for prometheus
-
Place the configuration file in
C:\monitoring\prometheus -
Download
prometheusfrom hereSelect the latest version and the file name will be like this:
prometheus-XX.YY.ZZ.windows-amd64.zipUnzip it, and copy all files in a folder likeC:\monitoring\prometheus -
Install Prometheus as a service
In order to install prometheus as a service, we need to do the following Open command line as
Administratorand navigate to the path where nssm is stored.Terminal window cd C:\monitoring\nssm\win64nssm.exe install prometheus C:\monitoring\prometheus\prometheus.exe --enable-feature=agent --config.file=C:\monitoring\prometheus\prometheus.yml -
Make sure service is started
- Press ⊞ Win + R
- Type
services.mscand press Enter - Check
prometheusservice isRunningandAutomatic - You can also run the following from from an open command line as
Administrator
Terminal window sc start prometheus