Re: MGR Zabbix and Python Trailing L Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 5, 2018 at 2:59 PM Mike A <mike.almateia@xxxxxxxxx> wrote:
>
> Hello!
>
> As soon as we started using a zabbix mgr plugin, we were faced with the problem of adding a symbol "L" at the end of the values of the unsigned integer types.
>
> Looks like that:
> mgr[zabbix] {'rd_bytes': 3838822714368L, 'total_bytes': 72014131888128L, 'overall_status_int': 0, 'osd_latency_apply_min': 0L, 'osd_latency_apply_max': 1L, …

That line is from the logging output, but I'm not seeing a path in the
code where the L would appear in the output that is sent to Zabbix.
The L suffix is used when dumping values for logging, but not in the
.format() function that we use when actually sending data:

>>> log.error({'foo': 2L})
{'foo': 2L}
>>> "{0} {1}".format('foo', 2L)
'foo 2'

I could be wrong, I haven't actually tested this with a running Zabbix instance.

John

>
> You can see the "L" at and of some values.
>
> Google tell me, the this is a normal for Python 2 (https://www.python.org/dev/peps/pep-0237/), but zabbix server can't accept these "wrong" values L.
>
> After all zabbix plugin seems to not work.
>
> How I can fix that?
>
> Ceph-12.2.7
> Zabbix server - 3.4.9
> Zabbix sender:  zabbix-sender-3.4.13-1.el7
> Python: python-2.7.5-69.el7_5
>
>
>
> Mike, runs!
>
>
>
>



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux