Install the OpsVerse Agent
The OpsVerse agent can be installed in seconds on a variety of environments to begin sending your telemetry (metrics, logs, and traces) to your ObserveNow backend.
This section will document how to install the agent on Kubernetes, Docker Swarm, Standalone Linux Machines, and Standalone Microsoft Windows Machines
Kubernetes
Monitoring a Kubernetes cluster is as simple as running a helm chart command on the cluster.
Getting Started
To collect metrics, logs, and traces from a Kubernetes cluster and its applications, run the following command:
$ helm upgrade --install devopsnow-agent -n devopsnow --create-namespace observe-agent \
--repo https://registry.devopsnow.io/chartrepo/public \
-f <path to opsverse-values.yaml file>Following is an example values.yaml file:
cluster_name: first-cluster
logs:
host: <logsHost>
username: devopsnow
password: <password>
multiline:
snippet: |
- multiline:
firstline: '^\d{2,4}\-\d{2,4}\-\d{2,4} \d{2,4}\:\d{2,4}\:\d{2,4}\.\d{1,6}'
max_lines: 200
victoria-metrics-agent:
remoteWriteUrls:
- https://<metricsHost>/api/v1/write
extraArgs:
remoteWrite.basicAuth.password: <password>
remoteWrite.basicAuth.username: devopsnow
remoteWrite.label: cluster=first-cluster
otelcollector:
enabled: true
jaeger:
url: "https://<tracesHost>/api/v2/spans"
auth: "Basic <`echo -n 'devopsnow:<password>' | base64`>"Single Machine
Some workloads run on a single machine - for example, a 64-bit Linux VM. You may also install the agent to collect metrics from that node (and any subsequent prometheus exporters you install on it) for end-to-end observability.
To do so, simply run:
# for amd64 machines
$ curl -L https://opsverse-public.s3.amazonaws.com/agent/single-node/installer.sh -o installer.sh && chmod +x ./installer.sh
# for arm64 machines
$ curl -L https://opsverse-public.s3.amazonaws.com/agent/single-node/installer-arm64.sh -o installer.sh && chmod +x ./installer.sh
sudo ./installer.sh -- -m <metricsHost> -l <logsHost> -t <tracesHost> -p <password>You can then verify the agent is running:
$ sudo systemctl status opsverse-agentIf some other service is using the port 12345, you might get an error with opsverse-agent logs as Failed to start OpsVerse Agent
To resolve this error, go to /etc/systemd/system/opsverse-agent.servicefile and add this -server.http.address=127.0.0.1:<port>at the last of ExecStartcommand. Please replace the placeholder <port> with port other than 12345.
For example: The/etc/systemd/system/opsverse-agent.service file should look like
...
ExecStart= /usr/local/bin/opsverse-telemetry-agent --config.file=/etc/opsverse/agent-config.yaml -config.expand-env -server.http.address=127.0.0.1:12347
...Now restart the agent by using the command and this should resolve the issue:
$ sudo systemctl restart opsverse-agentScrape Additional Targets
Some services already expose a /metrics endpoint that the agent can scrape and ship.
For the agent to automatically begin collecting those metrics, simply drop a JSON file inside /etc/opsverse/targets/ specifying where to scrape.
For example, you have a local etcd running, your file /etc/opsverse/targets/etcd.json may look like:
[
{
"labels": {
"job": "integrations/etcd"
},
"targets": [
"localhost:2379"
]
}
]For services that don't expose a /metrics endpoint, we run Prometheus Exporters for those services and scrape those targets instead.
Docker Compose
OpsVerse agents can be installed using docker compose.
Structure
- Download the opsverse-agent.zip file by using the command below and unzip it.
$ curl -LO https://github.com/OpsVerseIO/installers/raw/main/opsverse-agent.zip
$ unzip opsverse-agent.zipNOTE: You should have three files in the opsverse-agent folder; .env, docker-compose.yaml and agent/config/agent.yaml
Configuration
- .env is the only file you need to edit. The editable variables in the .env file can be found in your OpsVerse Admin Console.
- After editing the variables in the .env file, run the below command:
$ docker-compose up -dMicrosoft Windows
Installing OpsVerse Agent on machines running Microsoft Windows
Getting Started
To install OpsVerse Agent on Windows machine, follow the steps below:
Download the opsverse-agent-windows-installer.zip.
- Unzip the file.
- Open Windows Powershell as an administrator in the same path (i.e inside the opsverse-agent-windows-installer folder) and run the installation.ps1 using the command ./installation.ps1
- During the installation, the installer will ask,
- Enter a unique hostname.
- In the next step, the installer will ask the values of ObserveNow Metrics URL, ObserveNow Logs URL and the Password. You can find them in your OpsVerse Admin Console under ObserveNow > Integrations > URLs and Integration Credentials.
- That’s it. The installer will set up and configure OpsVerse ObserveNow agents to capture metrics from the Windows instance.
- Once the setup is complete, you should be able to see your Windows host machine in Grafana, and start seeing machine-specific metrics/logs flowing in."
You should be able to see the services up and running in Services.msc
Under Apps section of your ObserveNow instance, click on Grafana icon and go to the Explore section to explore logs and metrics collected by the agent.
