-
-
Notifications
You must be signed in to change notification settings - Fork 7
Documentation: Migrate from reporting-task to native Prometheus metrics #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A relevant message on NiFi Slack (cross-posting it here, as NiFi Slack looses messages):
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: monitoring
name: prometheus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: discoverer
rules:
- apiGroups: [""]
resources:
- nodes
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups:
- extensions
resources:
- ingresses
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus-discoverer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: discoverer
subjects:
- kind: ServiceAccount
name: prometheus
namespace: monitoring
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus
namespace: monitoring
labels:
app: prometheus
spec:
replicas: 1
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
spec:
serviceAccountName: prometheus
containers:
- name: prometheus
image: prom/prometheus:v2.33.4
ports:
- containerPort: 9090
volumeMounts:
- name: config
mountPath: /etc/prometheus
volumes:
- name: config
configMap:
name: prometheus-server-conf
---
apiVersion: v1
kind: Service
metadata:
name: prometheus
namespace: monitoring
spec:
selector:
app: prometheus
ports:
- port: 9090
---
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-server-conf
namespace: monitoring
labels:
name: prometheus-server-conf
data:
prometheus.yml: |
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'nifi-metrics'
metrics_path: '/nifi-api/flow/metrics/prometheus'
scheme: https
static_configs:
- targets:
- 'simple-nifi-node-default-0.simple-nifi-node-default.default.svc.cluster.local:8443'
basic_auth:
username: admin
password: admin
tls_config:
insecure_skip_verify: true
---
apiVersion: v1
kind: Service
metadata:
name: my-service-prometheus
namespace: monitoring
spec:
type: NodePort
selector:
app: prometheus
ports:
- port: 9090
targetPort: 9090
nodePort: 30090 |
docs pr: #786 |
The Reporting task was removed from NiFi 2.x.x in #708.
However,
/nifi-api/flow/metrics/prometheus
needs authentication- which might be a blocker :( Relevant Slack threadThe steps required for the migration/configuration of the metrics endpoint (auth, authz) and how to connect e.g. Prometheus, should be documented.
The text was updated successfully, but these errors were encountered: