[Python-modules-commits] [python-protobix] 01/03: New upstream version 1.0.1

Jean Baptiste Favre jbfavre-guest at moszumanska.debian.org
Mon Dec 4 15:12:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

jbfavre-guest pushed a commit to branch master
in repository python-protobix.

commit d21f6bd1a3650b7cd138eddb11eed549277a1df5
Author: Jean Baptiste Favre <debian at jbfavre.org>
Date:   Mon Dec 4 12:53:14 2017 +0100

    New upstream version 1.0.1
---
 README.md                 | 4 ++--
 protobix/datacontainer.py | 6 +++---
 protobix/sampleprobe.py   | 2 +-
 setup.py                  | 4 ++--
 tests/test_sampleprobe.py | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index 795c973..b44416e 100644
--- a/README.md
+++ b/README.md
@@ -80,7 +80,7 @@ import sys
 
 class ExampleProbe(protobix.SampleProbe):
 
-    __version__ = '1.0.0'
+    __version__ = '1.0.1'
     # discovery_key is *not* the one declared in Zabbix Agent configuration
     # it's the one declared in Zabbix template's "Discovery rules"
     discovery_key = "example.probe.llddiscovery"
@@ -217,7 +217,7 @@ DATA = {
 }
 
 zbx_datacontainer = protobix.DataContainer()
-zbx_datacontainer.data_type = 'items'
+zbx_datacontainer.data_type = 'lld'
 zbx_datacontainer.add(DATA)
 zbx_datacontainer.send()
 ```
diff --git a/protobix/datacontainer.py b/protobix/datacontainer.py
index 78780c1..4fd9e2b 100644
--- a/protobix/datacontainer.py
+++ b/protobix/datacontainer.py
@@ -34,7 +34,7 @@ class DataContainer(SenderProtocol):
             self.logger = logger
         self._items_list = []
 
-    def add_item(self, host, key, value, clock=None):
+    def add_item(self, host, key, value, clock=None, state=0):
         """
         Add a single item into DataContainer
 
@@ -47,9 +47,9 @@ class DataContainer(SenderProtocol):
             clock = self.clock
         if self._config.data_type == "items":
             item = {"host": host, "key": key,
-                    "value": value, "clock": clock}
+                    "value": value, "clock": clock, "state": state}
         elif self._config.data_type == "lld":
-            item = {"host": host, "key": key, "clock": clock,
+            item = {"host": host, "key": key, "clock": clock, "state": state,
                     "value": json.dumps({"data": value})}
         else:
             if self.logger: # pragma: no cover
diff --git a/protobix/sampleprobe.py b/protobix/sampleprobe.py
index 8c45fa2..a7adf27 100755
--- a/protobix/sampleprobe.py
+++ b/protobix/sampleprobe.py
@@ -11,7 +11,7 @@ from .zabbixagentconfig import ZabbixAgentConfig
 
 class SampleProbe(object):
 
-    __version__ = '1.0.0'
+    __version__ = '1.0.1'
     # Mapping between zabbix-agent Debug option & logging level
     LOG_LEVEL = [
         logging.NOTSET,
diff --git a/setup.py b/setup.py
index f083ccb..b4f33b7 100755
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ from setuptools import setup
 setup(
     name = 'protobix',
     packages = ['protobix'],
-    version = '1.0.0',
+    version = '1.0.1',
     install_requires = [
         'configobj',
         'simplejson'
@@ -26,7 +26,7 @@ setup(
     author_email = 'jean-baptiste.favre at blablacar.com',
     license = 'GPL-3+',
     url='https://github.com/jbfavre/python-protobix/',
-    download_url = 'https://github.com/jbfavre/python-protobix/archive/1.0.0.tar.gz',
+    download_url = 'https://github.com/jbfavre/python-protobix/archive/1.0.1.tar.gz',
     keywords = ['monitoring','zabbix','trappers'],
     classifiers = [],
    )
diff --git a/tests/test_sampleprobe.py b/tests/test_sampleprobe.py
index 249485e..9965f52 100644
--- a/tests/test_sampleprobe.py
+++ b/tests/test_sampleprobe.py
@@ -25,7 +25,7 @@ if sys.version_info > (2,7,9):
     HAVE_DECENT_SSL = True
 
 class ProtobixTestProbe(protobix.SampleProbe):
-    __version__="1.0.0"
+    __version__="1.0.1"
 
     def _get_metrics(self):
         return {
@@ -121,7 +121,7 @@ class ProtobixTLSTestProbe(ProtobixTestProbe):
         return  server_success, server_failure, processed, failed, total, time
 
 class ProtobixTestProbe2(protobix.SampleProbe):
-    __version__="1.0.0"
+    __version__="1.0.1"
 
 """
 Check default configuration of the sample probe

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-protobix.git



More information about the Python-modules-commits mailing list