Skip to content

Commit 7ecca52

Browse files
authored
Merge pull request #627 from MahendraR1/master
Update direct-promethues-export-support.md
2 parents fbceba3 + f2d3441 commit 7ecca52

1 file changed

Lines changed: 29 additions & 32 deletions

File tree

docs/configure/direct-promethues-export-support.md

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,35 @@ To enable NetScaler ingress controller to configure NetScaler CPX to support dir
2828
- If your Prometheus server is outside the Kubernetes cluster, add a scrape job under `scrape_configs` in the [Prometheus configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/). For a sample Prometheus scrape job, see the [Prometheus integration documentation](https://docs.netscaler.com/en-us/citrix-adc/current-release/observability/prometheus-integration#prometheus-configuration).
2929

3030
- If your Prometheus server is within the same Kubernetes cluster, add a new Prometheus job to configure Prometheus for directly exporting from a NetScaler CPX pod. For more information, see [kubernetes_sd_config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config). A sample Prometheus job is given as follows:
31-
32-
```yml
33-
34-
- job_name: 'kubernetes-cpx'
35-
scheme: http
36-
metrics_path: /nitro/v1/config/systemfile
37-
params:
38-
args: ['filename:metrics_prom_ns_analytics_time_series_profile.log,filelocation:/var/nslog']
39-
format: ['prometheus']
40-
basic_auth:
41-
username: cpx # Prometheus username set in nsic.prometheusCredentialSecret
42-
password: cpx # Prometheus password set in nsic.prometheusCredentialSecret
43-
scrape_interval: 30s
44-
kubernetes_sd_configs:
45-
- role: pod
46-
relabel_configs:
47-
- source_labels: [__meta_kubernetes_pod_annotation_netscaler_prometheus_scrape]
48-
action: keep
49-
regex: true
50-
- source_labels: [__address__, __meta_kubernetes_pod_annotation_netscaler_prometheus_port]
51-
action: replace
52-
regex: ([^:]+)(?::\d+)?;(\d+)
53-
replacement: $1:$2
54-
target_label: __address__
55-
- source_labels: [__meta_kubernetes_namespace]
56-
action: replace
57-
target_label: kubernetes_namespace
58-
- source_labels: [__meta_kubernetes_pod_name]
59-
action: replace
60-
target_label: kubernetes_pod_name
61-
62-
```
31+
```yml
32+
- job_name: 'kubernetes-cpx'
33+
scheme: http
34+
metrics_path: /nitro/v1/config/systemfile
35+
params:
36+
args: ['filename:metrics_prom_ns_analytics_time_series_profile.log,filelocation:/var/nslog']
37+
format: ['prometheus']
38+
basic_auth:
39+
username: # Prometheus username set in nsic.prometheusCredentialSecret
40+
password: # Prometheus password set in nsic.prometheusCredentialSecret
41+
scrape_interval: 30s
42+
kubernetes_sd_configs:
43+
- role: pod
44+
relabel_configs:
45+
- source_labels: [__meta_kubernetes_pod_annotation_netscaler_prometheus_scrape]
46+
action: keep
47+
regex: true
48+
- source_labels: [__address__, __meta_kubernetes_pod_annotation_netscaler_prometheus_port]
49+
action: replace
50+
regex: ([^:]+)(?::\d+)?;(\d+)
51+
replacement: $1:$2
52+
target_label: __address__
53+
- source_labels: [__meta_kubernetes_namespace]
54+
action: replace
55+
target_label: kubernetes_namespace
56+
- source_labels: [__meta_kubernetes_pod_name]
57+
action: replace
58+
target_label: kubernetes_pod_name
59+
```
6360
6461
**Note:**
6562
For more information on Prometheus integration, see the [NetScaler Prometheus integration documentation](https://docs.netscaler.com/en-us/citrix-adc/current-release/observability/prometheus-integration).

0 commit comments

Comments
 (0)