nginxplusreceiver

package
v3.0.0-...-28adb68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

README

NGINX Plus Receiver

This receiver can fetch stats from a NGINX Plus instance via the ngx_http_api_module module's api endpoint.

Configuration

NGINX Module

You must configure NGINX Plus to expose api information by editing the NGINX configuration.
Please see ngx_http_api_module for a guide to configuring the NGINX stats module ngx_http_api_module.

Receiver Config

The following settings are required:

The following settings are required:

  • api_details: Details for the NGINX Plus API endpoint.
    • url: (default: http://localhost:80/api): The URL of the NGINX Plus API endpoint.
    • listen: (default: localhost:80): The listen directive of the NGINX Plus API endpoint.
    • location: (default: /api): The location directive of the NGINX Plus API endpoint.

The following settings are optional:

  • collection_interval (default = 10s): This receiver collects metrics on an interval. This value must be a string readable by Golang's time.ParseDuration. Valid time units are ns, us (or µs), ms, s, m, h.

  • initial_delay (default = 1s): defines how long this receiver waits before starting.

Example:

receivers:
  nginxplus:
    api_details:
      url: "http://localhost:80/api"
      listen: "localhost:80"
      location: "/api"
    collection_interval: 10s

Documentation

Overview

Copyright (c) F5, Inc.

This source code is licensed under the Apache License, Version 2.0 license found in the LICENSE file in the root directory of this source tree.

Copyright (c) F5, Inc.

This source code is licensed under the Apache License, Version 2.0 license found in the LICENSE file in the root directory of this source tree.

Copyright (c) F5, Inc.

This source code is licensed under the Apache License, Version 2.0 license found in the LICENSE file in the root directory of this source tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

nolint: ireturn

Types

type APIDetails

type APIDetails struct {
	URL      string `mapstructure:"url"`
	Listen   string `mapstructure:"listen"`
	Location string `mapstructure:"location"`
}

type Config

type Config struct {
	confighttp.ClientConfig        `mapstructure:",squash"`
	APIDetails                     APIDetails                    `mapstructure:"api_details"`
	MetricsBuilderConfig           metadata.MetricsBuilderConfig `mapstructure:",squash"`
	scraperhelper.ControllerConfig `mapstructure:",squash"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the receiver configuration is valid

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL