Ad Widget

Collapse

Cetrificat check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dave_sutfene
    Junior Member
    • Nov 2013
    • 7

    #1

    Cetrificat check

    Hello all,

    i am a newbe at zabbix (v2.0.8). and read already many items for checking the expiring date of a certificate.

    i made the folowing script "email.sh" on the server:

    ssl-cert-check -s email.sutfene.nl -p 443 -n | sed 's/ */ /g' | cut -f2 -d=
    it is placed in /var/lib/zabbix/bin and user zabbix can run it. it returns a value let's say 500 which is in days.

    it is based on the post of Alixen https://www.zabbix.com/forum/showthread.php?t=15694

    in zabbix frontend i made an item based on a host??? as attached
    but it doesnt display any results. What am i doing wrong.
    Attached Files
    Last edited by Dave_sutfene; 19-11-2013, 13:21.
  • man
    Junior Member
    • Feb 2009
    • 5

    #2
    check this links:



    Join the friendly and open Zabbix community on our forums and social media platforms.

    Comment

    • Dave_sutfene
      Junior Member
      • Nov 2013
      • 7

      #3
      installed it, but ill get the error:
      "items.error: Received value [] is not suitable for value type [Numeric (float)]"

      When i run the script (which is in /var/lib/zabbix/bin) on the server as user zabbix with the parameters i get the correct values.

      i think it could be 2 things.

      1. Zabbix can somehow not run the program, or receive the value.
      --> so i gave zext.... a chmod +x and set zabbix as owner, but it didnt solve it

      2. I did not create a correct item
      --> i created an item with a DNS name of the server put in as SNMP and as agent. see attached image

      i am using zabbix 2.0.8
      Attached Files

      Comment

      • man
        Junior Member
        • Feb 2009
        • 5

        #4
        1. Zabbix can somehow not run the program, or receive the value.
        --> so i gave zext.... a chmod +x and set zabbix as owner, but it didnt solve it
        from link in previous post:

        zext_ssl_cert.sh must be installed in Zabbix external scripts directory (/etc/zabbix/externalscripts by default).
        in zabbix_server.conf you can configure location of external scripts. put there zext_ssl_cert.sh and give executable permissions for user who runs zabbix-server

        2. I did not create a correct item
        --> i created an item with a DNS name of the server put in as SNMP and as agent. see attached image
        you can remove snmp interface from host configuration it's not needed.
        certificate check is not SNMP trap type, it's an external check type and key is

        Code:
        zext_ssl_cert.sh[{HOST.CONN},{$SSL_PORT}]
        with this key zabbix-server will check certificate on that host where you have linked your template
        Last edited by man; 14-11-2013, 12:46.

        Comment

        • Dave_sutfene
          Junior Member
          • Nov 2013
          • 7

          #5
          okey, did a new clean installation of zabbix 2.2.0 on ubuntu this time

          but i still get the error
          " Received value [] is not suitable for value type [Numeric (float)]"

          as mentioned zabbix is owner of the file, in the terminal shell the zext can be run and gives a "530" as value.

          i recreated an item with the hostname as DNS in the agent field with port "443"

          Comment

          Working...