Hi Nathan,
On 2016-03-04 06:45, Nathan Scott wrote:
>
> This should fix the problematic interactions between zbxpcp and the
> new version of Zabbix with the ABI/API break. I noticed the problem
> structure (AGENT_RESULT) can actually be determined at runtime, so
> we can (at least in theory) solve this via a single .so as we first
> hoped. We don't ever use zbx_log_t (which also changed), and it is
> only ever referenced via pointer, so I made that opaque and dropped
> its definition entirely.
>
> This switches between using v2/v3 interface based on presence or lack
> of a named file. This is a bit suboptimal as it still involves some
> manual user interaction, but its better than having multiple shared
> libraries I think. If we could find some reliable way of detecting a
> Zabbix 3 vs 2 install (?) at runtime, we'd be laughing. Something in
> the environment, or a file we could test for? A symbol we could look
> for with dlsym, even? Anyway, this will probably do for now.
Thanks, this is a nice idea and the patch in general looks but I think I
agree with Frank that it'd be better to have a configuration file than a
.d directory. However, not sure would it have to be under /etc/pcp or
would /etc/zabbix be ok as well. Initially perhaps only the Zabbix
version and PCP source could be supported there. Do you think you could
update the patch in that regard, I can do some testing and also update
the man page accordingly?
> I don't know whether we need to set the new AGENT_RESULT fields, i.e.
> lastlogsize and mtime, in the zbxpcp.so v3 callback code - any idea?
I don't think so, the macros don't do it and a quick look at the agent
side doesn't reveal anything either.
Thanks,
--
Marko Myllynen
|