Ad Widget

Collapse

Send to zabbix server from c module, 60 datapoints every 60 s of one type of data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Przemyslaw
    Junior Member
    • Nov 2023
    • 4

    #1

    Send to zabbix server from c module, 60 datapoints every 60 s of one type of data


    Hello everyone

    I have question regarding sending data from zabbix_module.c .

    I would like to send every 1m data gathered from last 60 s per 1s (so 60 datapoints) of the same data type / key.
    Can zabbix gather data like that and is it possible to do with zabbix_module.c?

    I know how to gather data, and already I gather data 1 per 1 minute, but I need MOORE.


    client(s) version: 5.0.28
    server(s) version: 6.0.23​

    So thank you kindly Zabbix community.

    Przemyslaw

    ___

    Update

    So maybe if its not possible, perhaps sending to zabbix server new state whenever it changes, could it be done? preferably without using zabbix_sender.
    Last edited by Przemyslaw; 21-11-2023, 11:11.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4811

    #2
    What is it you have against zabbix_sender?
    Maybe emulate the trapper protocol then ? https://www.zabbix.com/documentation.../items/trapper

    Comment


    • Przemyslaw
      Przemyslaw commented
      Editing a comment
      Well I kinda don't have it, until now it was not needed so it was not on the system. Of course it can be done. But I was hoping for more performance friendly way.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4811

    #3
    zabbix_sender can handle quite a lot .. you can send in batches all your values gathered within last minute, all timestamped and nanosecond-ed.. Or keep it waiting for standard input... Something like 1 value per second is piece of cake..
    But as poitned, you can write your own emulator according to protocol... If that feels faster..

    Comment


    • Przemyslaw
      Przemyslaw commented
      Editing a comment
      I'm not concerned with speed of zabbix or it's constituting parts, like sender or agent. I'm concerned about machine on which this is working, sending every second messages will be quite taxing and may interfere with main functionality of this machine. But if there is no other way I will write daemon for that that will send with zabbix_sender when whenever is needed.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4811

    #4
    Maybe writing to file and sending it once per minute is less taxing? I guess you just need to test and find out..

    Comment

    • Przemyslaw
      Junior Member
      • Nov 2023
      • 4

      #5
      Thank you cyber for your answers and suggestions.
      I've decided to go with sending state 1 per minute and additional low level monitoring (or integrate into exisiting one) and send with zabbix_sender whenerver state changes.

      Maybe, I will update once It will come to implementing it, busy with other things.

      Thanks once again.

      Comment

      Working...