Get website certificate log with Filebeats

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.

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

I mean it's like I want to run command
"echo | openssl s_client -connect 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.

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.

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

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