Ad Widget

Collapse

Developers help needed: zabbix_sender.c modification in order to accept timestamp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rkvss
    Junior Member
    • Feb 2009
    • 1

    #1

    Developers help needed: zabbix_sender.c modification in order to accept timestamp

    Hi All!

    I need to store data to Zabbix using zabbix_sender (which reads data from file).
    But additionally I need to store data with specified timestamp.

    Investigating the sources (v.1.4.4 (running on my site)) i supposed that it should be possible. For that i need to pass timestamp as parameter to invocation of comms_create_request() instead of NULL:

    tosend = comms_create_request(sentdval_args->hostname, sentdval_args->key, sentdval_args->key_value,
    NULL, NULL, NULL, NULL);



    I didn't find any docs describing the sources. I'm not quite familiar with C and that is why reverse engineering of code is a big pain for me If anybody can answer some of my questions or correct me if i'm wrong, i would really appreciate it.

    1. Is it possible at all to store data with specified timestamp using zabbix_sender?
    2. Function comms_create_request() (src/libs/zbxcommon/comms.c) accepts following parameters:
    long *lastlogsize,
    unsigned long *timestamp,
    const char *source,
    unsigned short *severity

    2a: How can get value for "lastlogsize" in zabbix_sender.c to pass it as parameter?
    2b: What format of timestamp is required ?
    2c: What should be passed as "source" ?
    2d: What should be passed as "severity" ?

    Thank you.
Working...