Hi,
On 2015-11-06 01:20, Nathan Scott wrote:
>>
>> - pmNewContext(PM_CONTEXT_LOCAL, "") of course works as expected from
>> standalone clients but seems to fail from the DSO. This means that the
>
> Can you paste the failure message somewhere? (in case I can't get it
> to work, below) Off the top of my head I don't know why it would fail
> in local context mode.
this might be something completely Zabbix related after all, I tried
with the two attached tests which seems to work just fine.
>> What do you think, could this live in pcp.git?
>
> Maybe - there seems to be alot of conceptual overlap between this and
> the "pmrep -o zabbix ..." kind of approach - I suspect we should focus
> on doing one way well rather than both?
It sounds like Zabbix users have lots of different kinds of needs /
environments so one tool won't fit all. But in general I think this
loadable module approach might be more preferable one.
> How stable is the Zabbix module API/ABI? Are those headers available
> in distribution builds etc?
I'd suspect the API is not that widely used but it should be pretty
stable, it was introduced in Zabbix 2.2 released in Nov 2013 and the API
is still the same in Zabbix 3.0, currently under development.
I didn't find the headers in Fedora/RHEL packages so I downloaded the
sources from http://www.zabbix.com/download.php, then unpacked, ran
./configure (no need for any params), and then the headers were ready
for inclusion.
> Done that - I'm missing a bit of the recipe here though: where do the
> Zabbix headers come from? (needed for compiling zbxpcp.c). And once
> I have that built, how do I inform Zabbix agent? Taa.
See above, it's a bit clumsy. I added these lines to the
/etc/zabbix/zabbix_agentd.conf file and restarted the agent:
LoadModulePath=/tmp
LoadModule=zbxpcp.so
>> and then do something like "zabbix_agentd -p | grep pcp".
>
> (I have "zabbix_agentd -p" working, but obviously not the bridge part
> yet, so no "pcp" found just yet).
You can also test fetching individual metrics with something like:
$ zabbix_get -s 127.0.0.1 -s 10050 -k pcp.mem.util.free
Thanks,
--
Marko Myllynen
pmlib.so
Description: Binary data
pmtest.c
Description: Text document
pmtest2.c
Description: Text document
|