Ad Widget

Collapse

Advice for dealing with x509 certificate reading.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbix_mouse_123
    Junior Member
    • Oct 2025
    • 4

    #1

    Advice for dealing with x509 certificate reading.

    Using Zabbix version 7.4 and Zabbix agent 2 on relevant Linux hosts.

    I have a situation where I need to monitor certs on servers that are not accessible via endpoint. In other words, I have to read the certificate file.

    Ideally, I want to use native Zabbix functionality and not have to make changes to Zabbix conf files for allowkeys that would use openssl or similar.

    Server side, they are all .pem files, so I imagined reading the files and then doing JavaScript preprocessing was the only way to do this, but I don't think Duktape has the libraries to achieve this.

    I am not sure where to go from here and would appreciate any wisdom.
  • Brambo
    Senior Member
    • Jul 2023
    • 253

    #2
    Let the zabbix agent on host read the certificate if it's used on internal website. You can use template "Website certificate by Zabbix agent 2" for this or clone it and make the Cert: Get item a Zabbix Active Agent if you use that type of agent.
    With the agent is use the following key "web.certificate.get[{$1CERT.WEBSITE.HOSTNAME},{$1CERT.WEBSITE.PORT},{$ 1CERT.WEBSITE.IP}]" and those are own macro's but you can read easily what they represent

    Comment


    • zabbix_mouse_123
      zabbix_mouse_123 commented
      Editing a comment
      The certificates themselves are not reachable over the network or at an endpoint including localhost. The only way to observe them is via reading the files themselves, which are raw certificate files. Maybe I am misunderstanding your comment, but I am not sure its applicable in this case.
Working...