TLDR Josu was unable to see Apache server metrics using otel-collector-config.yaml. Srikanth suggested adding the Apache receiver to the metrics pipeline, which resolved the issue.
Did you configure the server to enable status report?
Yes, I put in the browser
```but I don't know where I can see the apache metrics.```
If the collector can scrape successfully the metrics show up when you type the metric name dashboards or alerts. You may want to look at the logs if there are any issues while getting metrics from apache.
so in apache I don't have to do anything right? Where can the logs be seen?
> so in apache I don’t have to do anything right? You need to configure the `httpd.conf` to let the collector receive the metrics > Where can the logs be seen? In the pod/container for the collector where you configured the apache receiver. Remember just adding the receiver also doesn’t create metrics. You need to add it to the pipeline.
el apache esta bien configurado. Cuando entra a :
```and on the other hand in otel-collector-config.yaml
I have configured this:
receivers:
Apache:
endpoint: "
```but what has been said... from the Dashboard or Alert I see the metrics```
```he apache log without problem. I see the calls to the status: 172.17.0.1 - - [26/Feb/2023:13:04:29 +0000] "GET /server-status?auto%22 HTTP/1.1" 200 1168 172.17.0.1 - - [26/Feb/2023:13:04:29 +0000] "GET /server-status?auto%22 HTTP/1.1" 200 1169 172.17.0.1 - - [26/Feb/2023:13:04:29 +0000] "GET /server-status?auto%22 HTTP/1.1" 200 1169 172.17.0.1 - - [26/Feb/2023:13:04:30 +0000] "GET /server-status?auto%22 HTTP/1.1" 200 1169 172.17.0.1 - - [26/Feb/2023:13:04:32 +0000] "GET /server-status?auto HTTP/1.1" 200 1169 172.17.0.1 - - [26/Feb/2023:13:04:34 +0000] "GET /server-status?auto HTTP/1.1" 200 1168 172.17.0.1 - - [26/Feb/2023:13:04:35 +0000] "GET /server-status?auto HTTP/1.1" 200 1169 172.17.0.1 - - [26/Feb/2023:13:04:35 +0000] "GET /server-status?auto HTTP/1.1" 200 1169 172.17.0.1 - - [26/Feb/2023:13:04:35 +0000] "GET /server-status?auto HTTP/1.1" 200 1168```
Share your full collector configuration
receivers:
filelog/dockercontainers:
include: [ "/var/lib/docker/containers/*/*.log" ]
start_at: end
include_file_path: true
include_file_name: false
operators:
- type: json_parser
id: parser-docker
output: extract_metadata_from_filepath
timestamp:
parse_from: attributes.time
layout: '%Y-%m-%dT%H:%M:%S.%LZ'
- type: regex_parser
id: extract_metadata_from_filepath
regex: '^.*containers/(?P<container_id>[^_]+)/.*log$'
parse_from: attributes["log.file.path"]
output: parse_body
- type: move
id: parse_body
from: attributes.log
to: body
output: time
- type: remove
id: time
field: attributes.time
opencensus:
endpoint: 0.0.0.0:55678
otlp/spanmetrics:
protocols:
grpc:
endpoint: localhost:12345
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:14250
thrift_http:
endpoint: 0.0.0.0:14268
# thrift_compact:
# endpoint: 0.0.0.0:6831
# thrift_binary:
# endpoint: 0.0.0.0:6832
hostmetrics:
collection_interval: 30s
scrapers:
cpu: {}
load: {}
memory: {}
disk: {}
filesystem: {}
network: {}
prometheus:
config:
global:
scrape_interval: 60s
scrape_configs:
# otel-collector internal metrics
- job_name: otel-collector
static_configs:
- targets:
- localhost:8888
labels:
job_name: otel-collector
apache:
endpoint: "
```on line 70 you will see:
Apache:
endpoint: "
You only added the receiver to the list but didn’t add it to the pipeline. As I mentioned earlier, just adding receiver alone doesn’t enable it you need to add it to the metrics pipeline.
```Would it also be added in?: otel-collector-metrics-config.yaml and how would it be done? I don't see anything in the documentation```
Add the apache in the pipeline here ``` metrics: receivers: [otlp] processors: [batch] exporters: [clickhousemetricswrite]``` ``` metrics: receivers: [otlp, apache] processors: [batch] exporters: [clickhousemetricswrite]```
```Thank you very much for the help. I see the apache metrics```
Josu
Sun, 26 Feb 2023 14:11:03 UTCHello, I want to monitor Apache. For this, in otel-collector-config.yaml I have added these lines: receivers: Apache: endpoint: ""
Where can I see the metrics of my Apache server? In alerts I can't see the metrics.