mumoshu / prometheus-process-exporter Goto Github PK
View Code? Open in Web Editor NEWHelml chart for Prometheus process-exporter
Helml chart for Prometheus process-exporter
---
# Source: prometheus-process-exporter/templates/psp.yaml
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
labels:
app: prometheus-process-exporter
name: release-name-prometheus-process-exporter
spec:
privileged: false
volumes:
- 'configMap'
- 'emptyDir'
- 'projected'
- 'secret'
- 'downwardAPI'
- 'persistentVolumeClaim'
- 'hostPath'
hostNetwork: true
hostIPC: false
hostPID: true
hostPorts:
- min: 0
max: 65535
runAsUser:
# Permits the container to run with root privileges as well.
rule: 'RunAsAny'
seLinux:
# This policy assumes the nodes are using AppArmor rather than SELinux.
rule: 'RunAsAny'
supplementalGroups:
rule: 'MustRunAs'
ranges:
# Forbid adding the root group.
- min: 0
max: 65535
fsGroup:
rule: 'MustRunAs'
ranges:
# Forbid adding the root group.
- min: 0
max: 65535
readOnlyRootFilesystem: false
---
# Source: prometheus-process-exporter/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: release-name-prometheus-process-exporter
labels:
app: prometheus-process-exporter
automountServiceAccountToken: true
---
# Source: prometheus-process-exporter/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
namespace: alert
name: release-name-prometheus-process-exporter
labels:
app: prometheus-process-exporter
data:
config.yml: |-
process_names:
- name: "{{.Comm}}"
cmdline:
- '.+'
---
# Source: prometheus-process-exporter/templates/psp-clusterrole.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
app: prometheus-process-exporter
name: psp-release-name-prometheus-process-exporter
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- release-name-prometheus-process-exporter
---
# Source: prometheus-process-exporter/templates/psp-clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app: prometheus-process-exporter
name: psp-release-name-prometheus-process-exporter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: psp-release-name-prometheus-process-exporter
subjects:
- kind: ServiceAccount
name: release-name-prometheus-process-exporter
namespace: alert
---
# Source: prometheus-process-exporter/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: alert
name: prometheus-process-exporter
labels:
app: prometheus-process-exporter
spec:
selector:
matchLabels:
app: prometheus-process-exporter
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: prometheus-process-exporter
spec:
serviceAccountName: release-name-prometheus-process-exporter
securityContext:
runAsNonRoot: true
runAsUser: 65534
containers:
- name: prometheus-process-exporter
image: xxx
imagePullPolicy: IfNotPresent
args:
- --procfs=/host/proc
- --config.path=/var/process-exporter/config.yml
- --web.listen-address=0.0.0.0:9256
- --debug=true
ports:
- containerPort: 9256
resources:
requests:
cpu: 120m
memory: 120Mi
volumeMounts:
- name: proc
mountPath: /host/proc
readOnly: true
- name: config
mountPath: /var/process-exporter
hostPID: true
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
volumes:
- name: proc
hostPath:
path: /proc
- name: config
configMap:
name: release-name-prometheus-process-exporter
I think the pod is running normally. Why can't I get metrics through K8s node ip: 9256/metrics?
I want to enter the container to check the problem, but an error is reported!
Hi,
the namedprocess_namegroup_open_filedesc always return 0 for all process when the process-exporter is deployed with the helm chart!
I have run the process-exporter binary and it is working ok but when we deploy it using helm chart it can't monitor open file descriptors.
Currently, the latest Chart version according to repository index is 0.4.2 (prometheus-process-exporter/master/docs)
However, the directory prometheus-process-exporter/charts/prometheus-process-exporter/Chart.yaml has more recent version — 0.5.0
Thank you
Hi @mumoshu, great work - Thanks!
Quick question - I couldn't manage to get the PodLabels working, when running the process exporter. I see the nodes, threads aso. but unfortunately, never the Pod names. Any hint or idea how to get that to work?
Thanks
You have the following values
securityContext:
runAsNonRoot: true
runAsUser: 65534
However they are not used anywhere in the chart. In the PSP you have
runAsUser:
# Permits the container to run with root privileges as well.
rule: 'RunAsAny'`
supplementalGroups:
rule: 'MustRunAs'
ranges:
# Forbid adding the root group.
- min: 0
max: 65535
fsGroup:
rule: 'MustRunAs'
ranges:
# Forbid adding the root group.
- min: 0
max: 65535
The logic wasn't implemented
Is the new chart getting a release to fix the api version error?
getting Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "psp-process-exporter-prometheus-process-exporter" namespace: "" from "": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "psp-process-exporter-prometheus-process-exporter" namespace: "" from "": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
ensure CRDs are installed first]
please can some one help with it
Hi @mumoshu, I have a situation where i needed to attach another label with the process-exporter metrics. Since the existing service-monitor
definition does not expose a parameter to add custom relabelings
config, i ended up adding a custom service monitor to my source code.
Here is a bitnami sample for adding custom relabelings
config.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.