Get website certificate log with Filebeats


(Chanawit Onchoo) #1

Is it possible way to use Filebeats to get certificate log from website(or others beats) or I need to build my own beats(or script) to do it.

Thank you for answer.


(Steffen Siering) #2

what exactly do you mean by 'certificate log from webstite' ?


(Chanawit Onchoo) #3

I mean it's like I want to run command
"echo | openssl s_client -connect google.com:443 2>/dev/null | openssl x509 -noout -dates"
and it will get log file that contains
"notBefore=Jun 23 08:40:05 2016 GMT
notAfter=Sep 15 08:31:00 2016 GMT"
and I want to to run it only on the beats and pass the infomation to Elasticsearch by not using script. Is it possible that filebeats can run command like that?

Thank you for your answer.


(Steffen Siering) #4

No, filebeat is only about collecting and shipping logs. It's not about executing arbitrary shell commands. One option would be (optionally with custom script) using a cron-job writing the log-file. Append date to log-file name to create unique filename per run + configure logrotate to delete old files + use filebeat to ship those logs.

Alternatively there is a community-beat (named execbeat) that might help here. But never tried it myself.


(Chanawit Onchoo) #5

Then I will try to use execbeat . Thanks a lot for the answer. Really appreciate it.


(system) #6

This topic was automatically closed after 21 days. New replies are no longer allowed.