Closed guptaalok20 closed 4 years ago
When you say that it isn't working, what do you mean? Do you get any messages in the logs? What metrics do you get back?
Looking at your scrape config, I think the issue is probably that you aren't setting the module you've defined as a parameter in your scrape config:
- job_name: 'xyz'
scrape_interval: 60s
metrics_path: /probe
params:
module: ["tcp_ftp_starttls"] # <----- module
static_configs:
- targets:
- <IP_Address>:22
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9319
Thanks a lot for your prompt response.
By not working I meant I was able to configure and scrape the FTP endpoint successfully.
I've now updated the prometheus.yaml as you suggested and now i see below error:
time="2020-07-13T20:03:50Z" level=debug msg="read line: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8" source="tcp.go:141" time="2020-07-13T20:04:00Z" level=error msg="read tcp 172.17.0.5:49554-><IP_Address>:22: i/o timeout" source="ssl_exporter.go:78"
I'm able to telnet the IP and port from this host so not sure why I'm getting timeout.
In Prometheus target is see below error: Get "http://127.0.0.1:9319/probe?module=tcp_ftp_starttls&target=IPaddress%3A22": context deadline exceeded
"read line: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8"
This suggests to me that you're connecting to an SFTP server (FTP over SSH) rather than an FTPS server (FTP over SSL). There's no certificate involved in the former, so this exporter is of no use to you there.
Perhaps you want to probe port 21? That's commonly where FTPS listens.
I will confirm if that's the case. Appreciate you help!
Cheers,
I'm trying to setup monitoring for SSL certificates over FTP and did below configurations:
Setting config: modules: tcp_ftp_starttls: prober: tcp tcp: starttls: ftp
Setting scrape config in prometheus: job_name: "xyz" scrape_interval: 60s metrics_path: /probe static_configs:
But this does not seem to be working. Am i missing something?