Ad Widget

Collapse

plugin execution on discovered hosts with web.certificate.get

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ramoneastral
    Member
    • Feb 2017
    • 33

    #1

    plugin execution on discovered hosts with web.certificate.get

    hello all,

    i am using LLD via http item to discovery a group of items that are than created as discovered hosts.

    these discovered hosts than have a template attached that will do another LLD via http and discover individual items.

    like pulling ssl cert information

    everything works fine all LDD items get created and than sit there to be populated.

    the item web.certificate.get on the second level of cascading will just not do anything.
    nor error / unsupported , no data

    other item on second cascade level just work fine ( icmpping, net.dns .... ); ldd will create, item will start to collect data

    i did copy a ldd created item to a "real" host and it start collecting data (web.certificate.get).

    is the plugin not able to work with discovered hosts and its items ?



    i am doing
    cloudflare rest api, pull all dns domains, pull individual A records per domain , do ssl cert check on individual A records
  • ramoneastral
    Member
    • Feb 2017
    • 33

    #2
    this all on 5.0.28

    Comment

    • ramoneastral
      Member
      • Feb 2017
      • 33

      #3
      it will do the same with 6.0.19
      export template from 5.0.28 installation
      import template into different 6.0.19 setup.

      does the plugin need a "real" host / client config to do its work ?

      Comment

      • ramoneastral
        Member
        • Feb 2017
        • 33

        #4
        what am i missing here ? if i run it manuall, it works !?!?
        on the 6.0.19 box
        update interval is set via macro to 5 min .

        --
        ~# /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf -t "web.certificate.get[www.VerySecretFQDN.com,443]" -v
        2023/07/13 09:21:25.697612 using plugin 'Agent' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.698486 using plugin 'Ceph' (built-in) providing following interfaces: exporter, runner, configurator
        2023/07/13 09:21:25.698894 using plugin 'Cpu' (built-in) providing following interfaces: exporter, collector, runner
        2023/07/13 09:21:25.699286 using plugin 'DNS' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.699666 closed connection to loaded PostgreSQL plugin
        2023/07/13 09:21:25.700067 using plugin 'Docker' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.700427 using plugin 'File' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.700807 using plugin 'Hw' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.701166 using plugin 'Kernel' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.701524 using plugin 'Log' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.701897 using plugin 'MQTT' (built-in) providing following interfaces: watcher, configurator
        2023/07/13 09:21:25.702278 using plugin 'Memcached' (built-in) providing following interfaces: exporter, runner, configurator
        2023/07/13 09:21:25.702634 using plugin 'Memory' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.703009 using plugin 'Modbus' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.703388 using plugin 'MongoDB' (/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb) providing following interfaces: exporter, runner, configurator
        2023/07/13 09:21:25.703708 using plugin 'Mysql' (built-in) providing following interfaces: exporter, runner, configurator
        2023/07/13 09:21:25.704009 using plugin 'NetIf' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.704257 using plugin 'Oracle' (built-in) providing following interfaces: exporter, runner, configurator
        2023/07/13 09:21:25.704427 using plugin 'PostgreSQL' (/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql) providing following interfaces: exporter, runner, configurator
        2023/07/13 09:21:25.704709 using plugin 'Proc' (built-in) providing following interfaces: exporter, collector
        2023/07/13 09:21:25.704930 using plugin 'ProcExporter' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.705092 using plugin 'Redis' (built-in) providing following interfaces: exporter, runner, configurator
        2023/07/13 09:21:25.705227 using plugin 'Smart' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.705439 using plugin 'Sw' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.705577 using plugin 'Swap' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.705792 using plugin 'SystemRun' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.705945 using plugin 'Systemd' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.706198 using plugin 'TCP' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.706334 using plugin 'UDP' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.706465 using plugin 'Uname' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.706734 using plugin 'Uptime' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.706874 using plugin 'Users' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.707107 using plugin 'VFSDev' (built-in) providing following interfaces: exporter, collector
        2023/07/13 09:21:25.707270 using plugin 'VFSDir' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.707481 using plugin 'VfsFs' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.707633 using plugin 'WebCertificate' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.707663 using plugin 'WebPage' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.707848 using plugin 'ZabbixAsync' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.707946 using plugin 'ZabbixStats' (built-in) providing following interfaces: exporter, configurator
        2023/07/13 09:21:25.707969 lowering the plugin ZabbixSync capacity to 1 as the configured capacity 100 exceeds limits
        2023/07/13 09:21:25.707988 using plugin 'ZabbixSync' (built-in) providing following interfaces: exporter
        2023/07/13 09:21:25.708052 [Modbus] Config is valid
        2023/07/13 09:21:25.708206 Plugin communication protocol version is 6.0.13
        2023/07/13 09:21:25.708261 starting manager
        2023/07/13 09:21:26.001049 [0] processing update request (1 requests)
        2023/07/13 09:21:26.001108 [0] registering new client
        2023/07/13 09:21:26.001128 Calling C function "new_global_regexp()"
        2023/07/13 09:21:26.001222 [0] adding new request for key: 'system.hostname'
        2023/07/13 09:21:26.001281 [0] created direct exporter task for plugin 'Uname' itemid:0 key 'system.hostname'
        2023/07/13 09:21:26.001390 executing direct exporter task for key 'system.hostname'
        2023/07/13 09:21:26.001414 executed direct exporter task for key 'system.hostname'
        2023/07/13 09:21:26.001889 both "Hostname" and "HostnameItem" configuration parameter defined, using "Hostname"
        2023/07/13 09:21:26.001944 [2] processing update request (1 requests)
        2023/07/13 09:21:26.001981 [2] registering new client
        2023/07/13 09:21:26.002039 Calling C function "new_global_regexp()"
        2023/07/13 09:21:26.002072 [2] adding new request for key: 'web.certificate.get[www.VerySecretFQDN.com,443]'
        2023/07/13 09:21:26.002105 [2] created direct exporter task for plugin 'WebCertificate' itemid:0 key 'web.certificate.get[www.VerySecretFQDN.com,443]'
        2023/07/13 09:21:26.002132 [2] created configurator task for plugin WebCertificate
        2023/07/13 09:21:26.002170 plugin WebCertificate: executing configurator task
        2023/07/13 09:21:26.002248 executing direct exporter task for key 'web.certificate.get[www.VerySecretFQDN.com,443]'
        2023/07/13 09:21:26.128786 executed direct exporter task for key 'web.certificate.get[www.VerySecretFQDN.com,443]'
        web.certificate.get[www.VerySecretFQDN.com,443] [s|{"x509":{"version":3,"serial_number":"51a1e566b 6 7f346711a05eb3a488bf9f","signature_algorithm":"SHA 256-RSA","issuer":"CN=GTS CA 1P5,O=Google Trust Services LLC,C=US","not_before":{"value":"Jun 16 10:58:11 2023 GMT","timestamp":1686913091},"not_after":{"value" : "Sep 14 10:58:10 2023 GMT","timestamp":1694689090},"subject":"CN=VerySe c retFQDN.com","public_key_algorithm":"RSA","alterna tive_names":["VerySecretFQDN.com","*.VerySecretFQDN.com"]},"result":{"value":"valid","message":"certifica te verified successfully"},"sha1_fingerprint":"eefef47a9b5a340 623906e5bd48360a039b7dbee","sha256_fingerprint":"4 7dee7c231e9df4afe5802265de0ed6f7e06011fc6ab862cf02 2c2f93b52e3ab"}]
        2023/07/13 09:21:26.129369 manager has been stopped​

        Comment

        • ramoneastral
          Member
          • Feb 2017
          • 33

          #5
          the ui of the item i ran on CLI
          Attached Files

          Comment

          • ramoneastral
            Member
            • Feb 2017
            • 33

            #6
            zabbix_get -s 127.0.0.1 -k web.certificate.get[secretFQDN,443,secret.IP] will also deliver as expected . front end still empty :-(

            Comment

            • ramoneastral
              Member
              • Feb 2017
              • 33

              #7
              bump ... anybody any idea ?

              Comment

              • ramoneastral
                Member
                • Feb 2017
                • 33

                #8
                eventually i was able to solve it....
                the web.certificate.get was set up as an active check.
                discovering hosts via ldd seldomly will hit the hostname that the client executable is having and expecting (hostname parameter in conf file) .... therefore the client never got any items as the client was asking for all items related to the client
                i had to read this 3 times to get around it ...


                so i changed the item to a passive check and it works now .... nicely

                Comment

                Working...