Comments (2)
@HumanUser actually you're right :)
Python time.time()
method returns an epoch time in seconds, ie the number of seonds since the 1st of january 1970.
Zabbix requires also an epoch timestamp.
What I wanted to get as default clock value is the current minute, not second, ie 18:34:00 and not 18:34:35, which is more convenient for Zabbix graphs.
That said, I figured out I should use int(time.time()/60)*60
to get the right result :-/
> python
Python 2.7.10 (default, Sep 13 2015, 20:30:50)
[GCC 5.2.1 20150911] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> print time.time()
1443458075.61
>>> print time.time()/60
24057634.5935
>>> print time.time()/60*60
1443458075.61
>>> print int(time.time()/60*60)
1443458075
>>> print int(time.time()/60)*60
1443458040
>>> print time.ctime(1443458075)
Mon Sep 28 18:34:35 2015
>>> print time.ctime(1443458040)
Mon Sep 28 18:34:00 2015
Thanks for pointing that out, will fix it asap
from python-protobix.
Please leave it open till it's fixed.
Thanks
from python-protobix.
Related Issues (13)
- self.items_list clear after succesful send HOT 2
- Error installing protobix HOT 1
- Reading ServerActive from zabbix_agentd.conf is broken
- Examples out of date HOT 1
- Read zabbix configuration from local zabbix_agentd.conf, if any
- Add logging capacity
- Parsing failed with several errors. HOT 4
- AttributeError: 'dict' object has no attribute 'data_type' HOT 1
- Add support for Zabbix 4.0
- ZBX_RESP_REGEX for Zabbix 2.0 HOT 2
- Add tests HOT 1
- Implement Zabbix Sender items number per sent limitation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-protobix.