zabbix_sender_api 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/Gemfile.lock +1 -1
 - data/README.md +2 -0
 - data/lib/zabbix_sender_api/api.rb +4 -2
 - data/lib/zabbix_sender_api/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: d16ac5d439463565af4464d544a3727b3db203f327f884db6ee4e1e0e6c3cf43
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: dc9a90da9cccafe560d8b5c2ced56eace9190ae0b1bf846bd4a28d3c8ba855c1
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 332b01b2058bbeeffe89dab63db3293202770d51c96f45dca4453d386640eae9b88bf81849b6165c0ff79c77db1ba167568f6d3b6f9ee5c3c3d2871e4bde69d6
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ae0e30678c6009254bf66704b5b9f817afe41c8d9c9cc1378ad1eae577af53c717c72d3802bfa14a88b684d818d8090b7d4017e38afaf42ea518887f4d6977c5
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -4,6 +4,8 @@ This gem describes an api that takes some of the drudgery out of the task of put 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            **Detailed documentation for this library is at [rubydoc.info](https://rubydoc.info/gems/zabbix_sender_api)**
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
      
 7 
     | 
    
         
            +
            Look at [the source for the zfstozab gem](https://gitlab.com/svdasein/zfstozab/-/blob/master/exe/zabbix-zfs.rb) for a practical example how to use this api.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       7 
9 
     | 
    
         
             
            zabbix_sender is a command line utility for sending monitoring data to Zabbix server or proxy. On the Zabbix server an item of type Zabbix trapper should be created with corresponding key.
         
     | 
| 
       8 
10 
     | 
    
         | 
| 
       9 
11 
     | 
    
         
             
             * [Zabbix sender manpage](https://www.zabbix.com/documentation/4.0/manpages/zabbix_sender)
         
     | 
| 
         @@ -60,6 +60,7 @@ class AgentConfiguration 
     | 
|
| 
       60 
60 
     | 
    
         
             
            end
         
     | 
| 
       61 
61 
     | 
    
         | 
| 
       62 
62 
     | 
    
         
             
            module Sender
         
     | 
| 
      
 63 
     | 
    
         
            +
            require 'set'
         
     | 
| 
       63 
64 
     | 
    
         | 
| 
       64 
65 
     | 
    
         
             
            ##
         
     | 
| 
       65 
66 
     | 
    
         
             
            # Pipe instances encapsulate communication to a running instance of zabbix_sender
         
     | 
| 
         @@ -172,12 +173,13 @@ end 
     | 
|
| 
       172 
173 
     | 
    
         
             
            # then pass the discover instance into a Batch via addDiscovery(), which 
         
     | 
| 
       173 
174 
     | 
    
         
             
            # includes it in the batch of data just like an ordinary ItemData instance.
         
     | 
| 
       174 
175 
     | 
    
         
             
            class Discovery < ItemData
         
     | 
| 
      
 176 
     | 
    
         
            +
              attr_reader :entities
         
     | 
| 
       175 
177 
     | 
    
         
             
              ##
         
     | 
| 
       176 
178 
     | 
    
         
             
              # The only required parameter is key:, which is the discovery rule key.
         
     | 
| 
       177 
179 
     | 
    
         
             
              #
         
     | 
| 
       178 
180 
     | 
    
         
             
              def initialize(key: nil,value: nil, timestamp:  nil, hostname: nil)
         
     | 
| 
       179 
181 
     | 
    
         
             
                super
         
     | 
| 
       180 
     | 
    
         
            -
                @entities =  
     | 
| 
      
 182 
     | 
    
         
            +
                @entities = Set.new
         
     | 
| 
       181 
183 
     | 
    
         
             
              end
         
     | 
| 
       182 
184 
     | 
    
         
             
              ##
         
     | 
| 
       183 
185 
     | 
    
         
             
              # This is how you pass data to zabbix that you use to construct items from item templates.  Pass in
         
     | 
| 
         @@ -193,7 +195,7 @@ class Discovery < ItemData 
     | 
|
| 
       193 
195 
     | 
    
         
             
                aHash.each_pair { |key,value|
         
     | 
| 
       194 
196 
     | 
    
         
             
                  zabbified[%Q({##{key.to_s.upcase}})] = value
         
     | 
| 
       195 
197 
     | 
    
         
             
                }
         
     | 
| 
       196 
     | 
    
         
            -
                @entities. 
     | 
| 
      
 198 
     | 
    
         
            +
                @entities.add(zabbified)
         
     | 
| 
       197 
199 
     | 
    
         
             
              end
         
     | 
| 
       198 
200 
     | 
    
         
             
              ##
         
     | 
| 
       199 
201 
     | 
    
         
             
              # Render this discovery instance as a zabbix_sender line.
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: zabbix_sender_api
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Dave Parker
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020-08- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-08-04 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: This gem describes an api to the zabbix sender facility. It saves tons
         
     | 
| 
       14 
14 
     | 
    
         
             
              of hassle when you're cranking out custom polling logic
         
     | 
| 
         @@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       58 
58 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       59 
59 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       60 
60 
     | 
    
         
             
            requirements: []
         
     | 
| 
       61 
     | 
    
         
            -
            rubygems_version: 3.1. 
     | 
| 
      
 61 
     | 
    
         
            +
            rubygems_version: 3.1.4
         
     | 
| 
       62 
62 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       63 
63 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       64 
64 
     | 
    
         
             
            summary: Ruby frontend to the zabbix_sender command line tool
         
     |