Enable the DataKit Prom plugin, copy the sample file
cd C:\Program Files\datakit\conf.d\prom
# Copy prom.conf.sample as prom.conf
Modify the prom.conf configuration file
Configuration as follows
[[inputs.prom]]## Exporter URLsurls=["http://127.0.0.1:9182/metrics"]## Ignore request errors for urlignore_req_err=false## Collector aliassource="active_directory"## Output source for collected data# Configure this item to write the collected data to a local file instead of sending it to the center# You can later debug the locally saved Measurement using the command `datakit --prom-conf /path/to/this/conf`# If the url has already been configured as a local file path, then the --prom-conf option will prioritize debugging the data in the output path# output = "/abs/path/to/file">## Upper limit for the size of collected data, in bytes# Set an upper limit for the size of collected data when outputting it to a local file# If the size of the collected data exceeds this limit, the data will be discarded# The default upper limit for the size of collected data is set to 32MB# max_file_size = 0## Metric type filtering, optional values are counter, gauge, histogram, summary# By default, only counter and gauge types of Metrics are collected# If empty, no filtering will be performedmetric_types=["counter","gauge"]## Metric name filtering# Supports regular expressions; multiple configurations can be made, satisfying any one of them is sufficient# If empty, no filtering will be performed# metric_name_filter = ["cpu"]## Prefix for Measurement names# Configure this item to add a prefix to the Measurement namemeasurement_prefix=""## Measurement name# By default, the Metric name will be split by underscores "_", with the first field after the split becoming the Measurement name, and the remaining fields becoming the current Metric name# If measurement_name is configured, the Metric name will not be split# The final Measurement name will have the measurement_prefix added as a prefix# measurement_name = "prom"## Collection interval "ns", "us" (or "µs"), "ms", "s", "m", "h"interval="10s"## Filter tags, multiple tags can be configured# Matching tags will be ignored# tags_ignore = ["xxxx"]## TLS configurationtls_open=false# tls_ca = "/tmp/ca.crt"# tls_cert = "/tmp/peer.crt"# tls_key = "/tmp/peer.key"## Custom authentication method, currently only supports Bearer Token# token and token_file: Only one of these needs to be configured# [inputs.prom.auth]# type = "bearer_token"# token = "xxxxxxxx"# token_file = "/tmp/token"## Custom Measurement name# Metrics with a prefix can be grouped into one category of Measurements# Custom Measurement name configuration takes precedence over the measurement_name configuration item#[[inputs.prom.measurements]]# prefix = "cpu_"# name = "cpu"# [[inputs.prom.measurements]]# prefix = "mem_"# name = "mem"## Custom Tags[inputs.prom.tags]service="active_directory"# more_tag = "some_other_value"
Restart DataKit (If log collection needs to be enabled, configure log collection and then restart)
Shows the number of objects received from neighbors through inbound replication. A neighbor is a domain controller from which the local domain controller replicates locally.
Displays the number of objects received from neighbors through inbound replication. A neighbor is a domain controller from which the local domain controller replicates locally.