summaryrefslogtreecommitdiff
path: root/docs/configuration/service/monitoring.rst
blob: 0aa93e71993f3bd4570033e530853e2f67fc57bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Monitoring
----------

Azure-data-explorer
===================
Telegraf output plugin azure-data-explorer_

.. cfgcmd:: set service monitoring telegraf azure-data-explorer authentication client-id <client-id>

   Authentication application client-id.

.. cfgcmd:: set service monitoring telegraf azure-data-explorer authentication client-secret <client-secret>

   Authentication application client-secret.

.. cfgcmd:: set service monitoring telegraf azure-data-explorer authentication tenant-id <tenant-id>

   Authentication application tenant-id

.. cfgcmd:: set service monitoring telegraf azure-data-explorer database <name>

   Remote database name.

.. cfgcmd:: set service monitoring telegraf azure-data-explorer group-metrics <single-table | table-per-metric>

   Type of metrics grouping when push to Azure Data Explorer. The default is
   ``table-per-metric``.

.. cfgcmd:: set service monitoring telegraf azure-data-explorer table <name>

   Name of the single table Only if set group-metrics single-table.

.. cfgcmd:: set service monitoring telegraf azure-data-explorer url <url>

   Remote URL.

Prometheus-client
=================
Telegraf output plugin prometheus-client_

.. cfgcmd:: set service monitoring telegraf prometheus-client

   Output plugin Prometheus client

.. cfgcmd:: set service monitoring telegraf prometheus-client allow-from <prefix>

   Networks allowed to query this server

.. cfgcmd:: set service monitoring telegraf prometheus-client authentication username <username>

   HTTP basic authentication username

.. cfgcmd:: set service monitoring telegraf prometheus-client authentication password <password>

   HTTP basic authentication username

.. cfgcmd:: set service monitoring telegraf prometheus-client listen-address <address>

   Local IP addresses to listen on

.. cfgcmd:: set service monitoring telegraf prometheus-client metric-version <1 | 2>

   Metris version, the default is ``2``

.. cfgcmd:: set service monitoring telegraf prometheus-client port <port>

   Port number used by connection, default is ``9273``

Example:

.. code-block:: none

  set service monitoring telegraf prometheus-client

.. code-block:: none

  vyos@r14:~$ curl --silent localhost:9273/metrics | egrep -v "#" |  grep cpu_usage_system
  cpu_usage_system{cpu="cpu-total",host="r14"} 0.20040080160320556
  cpu_usage_system{cpu="cpu0",host="r14"} 0.17182130584191915
  cpu_usage_system{cpu="cpu1",host="r14"} 0.22896393817971655

Splunk
======
Telegraf output plugin splunk_. HTTP Event Collector.

.. cfgcmd:: set service monitoring telegraf splunk authentication insecure

   Use TLS but skip host validation

.. cfgcmd:: set service monitoring telegraf splunk authentication token <token>

   Authorization token

.. cfgcmd:: set service monitoring telegraf splunk authentication url <url>

   Remote URL to Splunk collector

Example:

.. code-block:: none

  set service monitoring telegraf splunk authentication insecure
  set service monitoring telegraf splunk authentication token 'xxxxf5b8-xxxx-452a-xxxx-43828911xxxx'
  set service monitoring telegraf splunk url 'https://192.0.2.10:8088/services/collector'

Telegraf
========
Monitoring functionality with ``telegraf`` and ``InfluxDB 2`` is provided.
Telegraf is the open source server agent to help you collect metrics, events
and logs from your routers.

.. cfgcmd:: set service monitoring telegraf authentication organization <organization>

   Authentication organization name

.. cfgcmd:: set service monitoring telegraf authentication token <token>

   Authentication token

.. cfgcmd:: set service monitoring telegraf bucket <bucket>

   Remote ``InfluxDB`` bucket name

.. cfgcmd:: set service monitoring port <port>

   Remote port

.. cfgcmd:: set service monitoring telegraf url <url>

   Remote URL


Example
=======

An example of a configuration that sends ``telegraf`` metrics to remote
``InfluxDB 2``

.. code-block:: none

  set service monitoring telegraf authentication organization 'vyos'
  set service monitoring telegraf authentication token 'ZAml9Uy5wrhA...=='
  set service monitoring telegraf bucket 'bucket_vyos'
  set service monitoring telegraf port '8086'
  set service monitoring telegraf source 'all'
  set service monitoring telegraf url 'http://r1.influxdb2.local'

.. _azure-data-explorer: https://github.com/influxdata/telegraf/tree/master/plugins/outputs/azure_data_explorer
.. _prometheus-client: https://github.com/influxdata/telegraf/tree/master/plugins/outputs/prometheus_client
.. _splunk: https://www.splunk.com/en_us/blog/it/splunk-metrics-via-telegraf.html