| 1 | plugin_name: go.d.plugin |
| 2 | modules: |
| 3 | - meta: |
| 4 | id: collector-go.d.plugin-nats |
| 5 | plugin_name: go.d.plugin |
| 6 | module_name: nats |
| 7 | monitored_instance: |
| 8 | name: NATS |
| 9 | link: https://nats.io/ |
| 10 | categories: |
| 11 | - data-collection.databases |
| 12 | icon_filename: nats.svg |
| 13 | related_resources: |
| 14 | integrations: |
| 15 | list: [] |
| 16 | alternative_monitored_instances: [] |
| 17 | info_provided_to_referring_integrations: |
| 18 | description: "" |
| 19 | keywords: |
| 20 | - nats |
| 21 | - messaging |
| 22 | - broker |
| 23 | overview: |
| 24 | data_collection: |
| 25 | metrics_description: | |
| 26 | This collector monitors the activity and performance of NATS servers. |
| 27 | method_description: | |
| 28 | It sends HTTP requests to the NATS HTTP server's dedicated [monitoring port](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#monitoring-nats). |
| 29 | default_behavior: |
| 30 | auto_detection: |
| 31 | description: | |
| 32 | The collector can automatically detect NATS instances running on: |
| 33 | |
| 34 | - localhost that are listening on port 8222 |
| 35 | - within Docker containers |
| 36 | limits: |
| 37 | description: "" |
| 38 | performance_impact: |
| 39 | description: "" |
| 40 | additional_permissions: |
| 41 | description: "" |
| 42 | multi_instance: true |
| 43 | supported_platforms: |
| 44 | include: [] |
| 45 | exclude: [] |
| 46 | setup: |
| 47 | prerequisites: |
| 48 | list: |
| 49 | - title: Enable NATS monitoring |
| 50 | description: | |
| 51 | See [Enable monitoring](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#enabling-monitoring). |
| 52 | configuration: |
| 53 | file: |
| 54 | name: go.d/nats.conf |
| 55 | options: |
| 56 | description: | |
| 57 | The following options can be defined globally: update_every, autodetection_retry. |
| 58 | folding: |
| 59 | title: Config options |
| 60 | enabled: true |
| 61 | list: |
| 62 | - name: update_every |
| 63 | description: Data collection interval (seconds). |
| 64 | default_value: 1 |
| 65 | required: false |
| 66 | group: Collection |
| 67 | - name: autodetection_retry |
| 68 | description: Autodetection retry interval (seconds). Set 0 to disable. |
| 69 | default_value: 0 |
| 70 | required: false |
| 71 | group: Collection |
| 72 | |
| 73 | - name: url |
| 74 | description: Target endpoint URL. |
| 75 | default_value: http://127.0.0.1:8222 |
| 76 | required: true |
| 77 | group: Target |
| 78 | - name: timeout |
| 79 | description: HTTP request timeout (seconds). |
| 80 | default_value: 1 |
| 81 | required: false |
| 82 | group: Target |
| 83 | |
| 84 | - name: healthz_check |
| 85 | description: "Selects the `/healthz` [endpoint mode](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#health-healthz). Options: `default` (standard check), `js-enabled-only` (error if JetStream is disabled), `js-server-only` (skip account/stream/consumer checks)." |
| 86 | default_value: default |
| 87 | required: false |
| 88 | group: Validation |
| 89 | |
| 90 | - name: username |
| 91 | description: Username for Basic HTTP authentication. |
| 92 | default_value: "" |
| 93 | required: false |
| 94 | group: HTTP Auth |
| 95 | - name: password |
| 96 | description: Password for Basic HTTP authentication. |
| 97 | default_value: "" |
| 98 | required: false |
| 99 | group: HTTP Auth |
| 100 | - name: bearer_token_file |
| 101 | description: "Path to a file containing a bearer token (used for `Authorization: Bearer`)." |
| 102 | default_value: "" |
| 103 | required: false |
| 104 | group: HTTP Auth |
| 105 | |
| 106 | - name: tls_skip_verify |
| 107 | description: Skip TLS certificate and hostname verification (insecure). |
| 108 | default_value: no |
| 109 | required: false |
| 110 | group: TLS |
| 111 | - name: tls_ca |
| 112 | description: Path to CA bundle used to validate the server certificate. |
| 113 | default_value: "" |
| 114 | required: false |
| 115 | group: TLS |
| 116 | - name: tls_cert |
| 117 | description: Path to client TLS certificate (for mTLS). |
| 118 | default_value: "" |
| 119 | required: false |
| 120 | group: TLS |
| 121 | - name: tls_key |
| 122 | description: Path to client TLS private key (for mTLS). |
| 123 | default_value: "" |
| 124 | required: false |
| 125 | group: TLS |
| 126 | |
| 127 | - name: proxy_url |
| 128 | description: HTTP proxy URL. |
| 129 | default_value: "" |
| 130 | required: false |
| 131 | group: Proxy |
| 132 | - name: proxy_username |
| 133 | description: Username for proxy Basic HTTP authentication. |
| 134 | default_value: "" |
| 135 | required: false |
| 136 | group: Proxy |
| 137 | - name: proxy_password |
| 138 | description: Password for proxy Basic HTTP authentication. |
| 139 | default_value: "" |
| 140 | required: false |
| 141 | group: Proxy |
| 142 | |
| 143 | - name: method |
| 144 | description: HTTP method to use. |
| 145 | default_value: "GET" |
| 146 | required: false |
| 147 | group: Request |
| 148 | - name: body |
| 149 | description: Request body (e.g., for POST/PUT). |
| 150 | default_value: "" |
| 151 | required: false |
| 152 | group: Request |
| 153 | - name: headers |
| 154 | description: "Additional HTTP headers (one per line as key: value)." |
| 155 | default_value: "" |
| 156 | required: false |
| 157 | group: Request |
| 158 | - name: not_follow_redirects |
| 159 | description: Do not follow HTTP redirects. |
| 160 | default_value: no |
| 161 | required: false |
| 162 | group: Request |
| 163 | - name: force_http2 |
| 164 | description: Force HTTP/2 (including h2c over TCP). |
| 165 | default_value: no |
| 166 | required: false |
| 167 | group: Request |
| 168 | |
| 169 | - name: vnode |
| 170 | description: Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes). |
| 171 | default_value: "" |
| 172 | required: false |
| 173 | group: Virtual Node |
| 174 | examples: |
| 175 | folding: |
| 176 | title: Config |
| 177 | enabled: true |
| 178 | list: |
| 179 | - name: Basic |
| 180 | description: A basic example configuration. |
| 181 | folding: |
| 182 | enabled: false |
| 183 | config: | |
| 184 | jobs: |
| 185 | - name: local |
| 186 | url: http://127.0.0.1:8222 |
| 187 | - name: HTTP authentication |
| 188 | description: Basic HTTP authentication. |
| 189 | config: | |
| 190 | jobs: |
| 191 | - name: local |
| 192 | url: http://127.0.0.1:8222 |
| 193 | username: username |
| 194 | password: password |
| 195 | - name: HTTPS with self-signed certificate |
| 196 | description: NATS with enabled HTTPS and self-signed certificate. |
| 197 | config: | |
| 198 | jobs: |
| 199 | - name: local |
| 200 | url: http://127.0.0.1:8222 |
| 201 | tls_skip_verify: yes |
| 202 | - name: Multi-instance |
| 203 | description: | |
| 204 | > **Note**: When you define multiple jobs, their names must be unique. |
| 205 | |
| 206 | Collecting metrics from local and remote instances. |
| 207 | config: | |
| 208 | jobs: |
| 209 | - name: local |
| 210 | url: http://127.0.0.1:8222 |
| 211 | |
| 212 | - name: remote |
| 213 | url: http://192.0.2.1:8222 |
| 214 | troubleshooting: |
| 215 | problems: |
| 216 | list: [] |
| 217 | alerts: [] |
| 218 | metrics: |
| 219 | folding: |
| 220 | title: Metrics |
| 221 | enabled: false |
| 222 | description: "" |
| 223 | availability: [] |
| 224 | scopes: |
| 225 | - name: server |
| 226 | description: These metrics refer to NATS servers. |
| 227 | labels: |
| 228 | - name: cluster_name |
| 229 | description: "The name of the NATS cluster this server belongs to." |
| 230 | - name: server_id |
| 231 | description: "A unique identifier for a server within the NATS cluster." |
| 232 | - name: server_name |
| 233 | description: "The configured name of the NATS server." |
| 234 | metrics: |
| 235 | - name: nats.server_traffic |
| 236 | description: Server Traffic |
| 237 | unit: bytes/s |
| 238 | chart_type: area |
| 239 | dimensions: |
| 240 | - name: received |
| 241 | - name: sent |
| 242 | - name: nats.server_messages |
| 243 | description: Server Messages |
| 244 | unit: messages/s |
| 245 | chart_type: line |
| 246 | dimensions: |
| 247 | - name: received |
| 248 | - name: sent |
| 249 | - name: nats.server_connections |
| 250 | description: Server Active Connections |
| 251 | unit: connections |
| 252 | chart_type: line |
| 253 | dimensions: |
| 254 | - name: active |
| 255 | - name: nats.server_connections_rate |
| 256 | description: Server Connections |
| 257 | unit: connections/s |
| 258 | chart_type: line |
| 259 | dimensions: |
| 260 | - name: connections |
| 261 | - name: nats.server_health_probe_status |
| 262 | description: Server Health Probe Status |
| 263 | unit: status |
| 264 | chart_type: line |
| 265 | dimensions: |
| 266 | - name: ok |
| 267 | - name: error |
| 268 | - name: nats.server_cpu_usage |
| 269 | description: Server CPU Usage |
| 270 | unit: percent |
| 271 | chart_type: area |
| 272 | dimensions: |
| 273 | - name: used |
| 274 | - name: nats.server_mem_usage |
| 275 | description: Server Memory Usage |
| 276 | unit: bytes |
| 277 | chart_type: area |
| 278 | dimensions: |
| 279 | - name: used |
| 280 | - name: nats.server_uptime |
| 281 | description: Server Uptime |
| 282 | unit: seconds |
| 283 | chart_type: line |
| 284 | dimensions: |
| 285 | - name: uptime |
| 286 | - name: nats.jetstream_streams |
| 287 | description: JetStream Streams |
| 288 | unit: streams |
| 289 | chart_type: line |
| 290 | dimensions: |
| 291 | - name: active |
| 292 | - name: nats.jetstream_streams_storage_bytes |
| 293 | description: JetStream Bytes |
| 294 | unit: bytes |
| 295 | chart_type: area |
| 296 | dimensions: |
| 297 | - name: used |
| 298 | - name: nats.jetstream_streams_storage_messages |
| 299 | description: JetStream Messages |
| 300 | unit: messaged |
| 301 | chart_type: line |
| 302 | dimensions: |
| 303 | - name: stored |
| 304 | - name: nats.jetstream_consumers |
| 305 | description: JetStream Consumers |
| 306 | unit: consumers |
| 307 | chart_type: line |
| 308 | dimensions: |
| 309 | - name: active |
| 310 | - name: nats.jetstream_api_requests |
| 311 | description: JetStream API Requests |
| 312 | unit: requests/s |
| 313 | chart_type: line |
| 314 | dimensions: |
| 315 | - name: requests |
| 316 | - name: nats.jetstream_api_errors |
| 317 | description: JetStream API Errors |
| 318 | unit: errors/s |
| 319 | chart_type: line |
| 320 | dimensions: |
| 321 | - name: errors |
| 322 | - name: nats.jetstream_api_inflight |
| 323 | description: JetStream API Inflight |
| 324 | unit: requests |
| 325 | chart_type: line |
| 326 | dimensions: |
| 327 | - name: inflight |
| 328 | - name: nats.jetstream_memory_used |
| 329 | description: JetStream Used Memory |
| 330 | unit: bytes |
| 331 | chart_type: area |
| 332 | dimensions: |
| 333 | - name: used |
| 334 | - name: nats.jetstream_storage_used |
| 335 | description: JetStream Used Storage |
| 336 | unit: bytes |
| 337 | chart_type: line |
| 338 | dimensions: |
| 339 | - name: used |
| 340 | - name: http endpoint |
| 341 | description: These metrics refer to HTTP endpoints. |
| 342 | labels: |
| 343 | - name: cluster_name |
| 344 | description: "The name of the NATS cluster this server belongs to." |
| 345 | - name: server_id |
| 346 | description: "A unique identifier for a server within the NATS cluster." |
| 347 | - name: server_name |
| 348 | description: "The configured name of the NATS server." |
| 349 | - name: http_endpoint |
| 350 | description: "HTTP endpoint path." |
| 351 | metrics: |
| 352 | - name: nats.http_endpoint_requests |
| 353 | description: HTTP Endpoint Requests |
| 354 | unit: requests/s |
| 355 | chart_type: line |
| 356 | dimensions: |
| 357 | - name: requests |
| 358 | - name: account |
| 359 | description: These metrics refer to [Accounts](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#account-statistics). |
| 360 | labels: |
| 361 | - name: cluster_name |
| 362 | description: "The name of the NATS cluster this server belongs to." |
| 363 | - name: server_id |
| 364 | description: "A unique identifier for a server within the NATS cluster." |
| 365 | - name: server_name |
| 366 | description: "The configured name of the NATS server." |
| 367 | - name: account |
| 368 | description: "Account name." |
| 369 | metrics: |
| 370 | - name: nats.account_traffic |
| 371 | description: Account Traffic |
| 372 | unit: bytes/s |
| 373 | chart_type: area |
| 374 | dimensions: |
| 375 | - name: received |
| 376 | - name: sent |
| 377 | - name: nats.account_messages |
| 378 | description: Account Messages |
| 379 | unit: messages/s |
| 380 | chart_type: line |
| 381 | dimensions: |
| 382 | - name: received |
| 383 | - name: sent |
| 384 | - name: nats.account_connections |
| 385 | description: Account Active Connections |
| 386 | unit: connections |
| 387 | chart_type: line |
| 388 | dimensions: |
| 389 | - name: active |
| 390 | - name: nats.account_connections_rate |
| 391 | description: Account Connections |
| 392 | unit: connections/s |
| 393 | chart_type: line |
| 394 | dimensions: |
| 395 | - name: connections |
| 396 | - name: nats.account_subscriptions |
| 397 | description: Account Active Subscriptions |
| 398 | unit: subscriptions |
| 399 | chart_type: line |
| 400 | dimensions: |
| 401 | - name: active |
| 402 | - name: nats.account_slow_consumers |
| 403 | description: Account Slow Consumers |
| 404 | unit: consumers/s |
| 405 | chart_type: line |
| 406 | dimensions: |
| 407 | - name: slow |
| 408 | - name: nats.account_leaf_nodes |
| 409 | description: Account Leaf Nodes |
| 410 | unit: servers |
| 411 | chart_type: line |
| 412 | dimensions: |
| 413 | - name: leafnode |
| 414 | - name: route |
| 415 | description: These metrics refer to [Routes](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#route-information). |
| 416 | labels: |
| 417 | - name: cluster_name |
| 418 | description: "The name of the NATS cluster this server belongs to." |
| 419 | - name: server_id |
| 420 | description: "A unique identifier for a server within the NATS cluster." |
| 421 | - name: server_name |
| 422 | description: "The configured name of the NATS server." |
| 423 | - name: route_id |
| 424 | description: "A unique identifier for a route within the NATS cluster." |
| 425 | - name: remote_id |
| 426 | description: "he unique identifier of the remote server connected via the route." |
| 427 | metrics: |
| 428 | - name: nats.route_traffic |
| 429 | description: Route Traffic |
| 430 | unit: bytes/s |
| 431 | chart_type: area |
| 432 | dimensions: |
| 433 | - name: in |
| 434 | - name: out |
| 435 | - name: nats.route_messages |
| 436 | description: Route Messages |
| 437 | unit: messages/s |
| 438 | chart_type: line |
| 439 | dimensions: |
| 440 | - name: in |
| 441 | - name: out |
| 442 | - name: nats.route_subscriptions |
| 443 | description: Route Active Subscriptions |
| 444 | unit: subscriptions |
| 445 | chart_type: line |
| 446 | dimensions: |
| 447 | - name: active |
| 448 | - name: inbound gateway connection |
| 449 | description: These metrics refer to [Inbound Gateway Connections](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#gateway-information). |
| 450 | labels: |
| 451 | - name: cluster_name |
| 452 | description: "The name of the NATS cluster this server belongs to." |
| 453 | - name: server_id |
| 454 | description: "A unique identifier for a server within the NATS cluster." |
| 455 | - name: server_name |
| 456 | description: "The configured name of the NATS server." |
| 457 | - name: gateway |
| 458 | description: "The name of the local gateway." |
| 459 | - name: remote_gateway |
| 460 | description: "The name of the remote gateway." |
| 461 | - name: cid |
| 462 | description: "A unique identifier for the connection." |
| 463 | metrics: |
| 464 | - name: nats.inbound_gateway_conn_traffic |
| 465 | description: Inbound Gateway Traffic |
| 466 | unit: bytes/s |
| 467 | chart_type: area |
| 468 | dimensions: |
| 469 | - name: in |
| 470 | - name: out |
| 471 | - name: nats.inbound_gateway_conn_messages |
| 472 | description: Inbound Gateway Messages |
| 473 | unit: messages/s |
| 474 | chart_type: line |
| 475 | dimensions: |
| 476 | - name: in |
| 477 | - name: out |
| 478 | - name: nats.inbound_gateway_conn_subscriptions |
| 479 | description: Inbound Gateway Active Subscriptions |
| 480 | unit: subscriptions |
| 481 | chart_type: line |
| 482 | dimensions: |
| 483 | - name: active |
| 484 | - name: nats.inbound_gateway_conn_uptime |
| 485 | description: Inbound Gateway Connection Uptime |
| 486 | unit: seconds |
| 487 | chart_type: line |
| 488 | dimensions: |
| 489 | - name: uptime |
| 490 | - name: outbound gateway connection |
| 491 | description: These metrics refer to [Outbound Gateway Connections](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#gateway-information). |
| 492 | labels: |
| 493 | - name: cluster_name |
| 494 | description: "The name of the NATS cluster this server belongs to." |
| 495 | - name: server_id |
| 496 | description: "A unique identifier for a server within the NATS cluster." |
| 497 | - name: server_name |
| 498 | description: "The configured name of the NATS server." |
| 499 | - name: gateway |
| 500 | description: "The name of the local gateway." |
| 501 | - name: remote_gateway |
| 502 | description: "The name of the remote gateway." |
| 503 | - name: cid |
| 504 | description: "A unique identifier for the connection." |
| 505 | metrics: |
| 506 | - name: nats.outbound_gateway_conn_traffic |
| 507 | description: Outbound Gateway Traffic |
| 508 | unit: bytes/s |
| 509 | chart_type: area |
| 510 | dimensions: |
| 511 | - name: in |
| 512 | - name: out |
| 513 | - name: nats.outbound_gateway_conn_messages |
| 514 | description: Outbound Gateway Messages |
| 515 | unit: messages/s |
| 516 | chart_type: line |
| 517 | dimensions: |
| 518 | - name: in |
| 519 | - name: out |
| 520 | - name: nats.outbound_gateway_conn_subscriptions |
| 521 | description: Outbound Gateway Active Subscriptions |
| 522 | unit: subscriptions |
| 523 | chart_type: line |
| 524 | dimensions: |
| 525 | - name: active |
| 526 | - name: nats.outbound_gateway_conn_uptime |
| 527 | description: Outbound Gateway Connection Uptime |
| 528 | unit: seconds |
| 529 | chart_type: line |
| 530 | dimensions: |
| 531 | - name: uptime |
| 532 | - name: leaf node connection |
| 533 | description: These metrics refer to [Leaf Node Connections](https://docs.nats.io/running-a-nats-service/nats_admin/monitoring#leaf-node-information). |
| 534 | labels: |
| 535 | - name: cluster_name |
| 536 | description: "The name of the NATS cluster this server belongs to." |
| 537 | - name: server_id |
| 538 | description: "A unique identifier for a server within the NATS cluster." |
| 539 | - name: server_name |
| 540 | description: "The configured name of the NATS server." |
| 541 | - name: remote_name |
| 542 | description: "Unique identifier of the remote leaf node server, either its configured name or automatically assigned ID." |
| 543 | - name: account |
| 544 | description: "Name of the associated account." |
| 545 | - name: ip |
| 546 | description: "IP address of the remote server." |
| 547 | - name: port |
| 548 | description: "Port used for the connection to the remote server." |
| 549 | metrics: |
| 550 | - name: nats.leaf_node_conn_traffic |
| 551 | description: Leaf Node Connection Traffic |
| 552 | unit: bytes/s |
| 553 | chart_type: area |
| 554 | dimensions: |
| 555 | - name: in |
| 556 | - name: out |
| 557 | - name: nats.leaf_node_conn_messages |
| 558 | description: Leaf Node Connection Messages |
| 559 | unit: messages/s |
| 560 | chart_type: line |
| 561 | dimensions: |
| 562 | - name: in |
| 563 | - name: out |
| 564 | - name: nats.leaf_node_conn_subscriptions |
| 565 | description: Leaf Node Connection Active Subscriptions |
| 566 | unit: subscriptions |
| 567 | chart_type: line |
| 568 | dimensions: |
| 569 | - name: active |
| 570 | - name: nats.leaf_node_conn_rtt |
| 571 | description: Leaf Node Connection RTT |
| 572 | unit: microseconds |
| 573 | chart_type: line |
| 574 | dimensions: |
| 575 | - name: rtt |