Open VLZZZ opened 1 year ago
@VLZZZ Although the operator doesn't creates the service on it's own, I created a kbernetes service like this:
apiVersion: v1
kind: Service
metadata:
labels:
operator.agent.grafana.com/name: grafana-agent
operator.agent.grafana.com/shard: "0"
operator.agent.grafana.com/type: integrations
name: statsd
spec:
ports:
- port: 9125
protocol: UDP
targetPort: 9125
selector:
operator.agent.grafana.com/name: grafana-agent
operator.agent.grafana.com/shard: "0"
operator.agent.grafana.com/type: integrations
In the service's spec->selector I am matching lables for the "grafana-agent-integrations-deploy" deployment which gets created by the GrafanaAgent operator.
My Integration is a little different though:
apiVersion: monitoring.grafana.com/v1alpha1
kind: Integration
metadata:
labels:
agent: grafana-agent-metrics # will be collected by the other MetricsIntance
type: grafana-statsd-integration
name: agent-statsd-exporter
namespace: grafana
spec:
name: statsd
type:
unique: true
config:
listen_udp: :9125
listen_tcp: :9125
autoscrape:
enable: true
metrics_instance: grafana/metrics-instance
Where the metrics_instance
helps me point to the correct remoteWrite
Once the above two are set, you can use the host and port of the service to send metrics to statsD exporter.
What's wrong?
Hi!
I can't understand if
agent-operator
(aka static mode agent) is capable of running statsd_exporter integration in a push mode (TCP/UDP listener) as described in Grafana agent static mode docs.The issue is that you can't have custom ports for the
Kind: GrafanaAgent
unless custom containers are used.statsd_exporter
listener also can't be configured to match the single server listen port8080
as it will be a conflict (as expected).Is it even possible to implement a push model for
statsd_exporter
integration while usingKind: Integrations
CRD? No documentation was found addressing this kind of do/don't approach.Steps to reproduce
agent-operator
integrations
CRD supportstatsd_exporter
CRD integration - no way to send TCP/UDP metrics tostatsd_exporter
integrationsSystem information
No response
Software version
Grafana agent v0.33.1
Configuration
Logs