Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION]:Write json data to kafka failed #163

Closed
James601232 opened this issue May 31, 2022 · 2 comments
Closed

[QUESTION]:Write json data to kafka failed #163

James601232 opened this issue May 31, 2022 · 2 comments
Labels
question Further information is requested

Comments

@James601232
Copy link

version: ilogtail 1.0.31
configruarion:
{

"metrics":
{
"##1.0##kafka_output_test":
{
"category": "file",
"log_type": "json_log",
"log_path": "/root/bin/input_data",
"file_pattern": "json.log",
"create_time": 1631018645,
"defaultEndpoint": "",
"delay_alarm_bytes": 0,
"delay_skip_bytes": 0,
"discard_none_utf8": false,
"discard_unmatch": false,
"docker_exclude_env":
{},
"docker_exclude_label":
{},
"docker_file": false,
"docker_include_env":
{},
"docker_include_label":
{},
"enable": true,
"enable_tag": false,
"file_encoding": "utf8",
"filter_keys":
[],
"filter_regs":
[],
"group_topic": "",
"plugin":
{
"flushers":
[
{
"type": "flusher_kafka",
"detail":
{
"Brokers":
[
"192.168.1.1:2181"
],
"Topic": "test"
}
}
]
},
"local_storage": true,
"log_tz": "",
"max_depth": 10,
"max_send_rate": -1,
"merge_type": "topic",
"preserve": true,
"preserve_depth": 1,
"priority": 0,
"raw_log": false,
"aliuid": "",
"region": "",
"project_name": "",
"send_rate_expire": 0,
"sensitive_keys":
[],
"shard_hash_key":
[],
"tail_existed": false,
"time_key": "",
"timeformat": "",
"topic_format": "none",
"tz_adjust": false,
"version": 1,
"advanced":
{
"force_multiconfig": false,
"tail_size_kb": 1024
}
}
}
}

ilogtail.LOG have following errors:
image

And no data write in kafka

@James601232 James601232 added the question Further information is requested label May 31, 2022
@linrunqi08
Copy link
Collaborator

Hi James601232, please try to use this config to collect json data to kafka.
{
"metrics":
{
"##1.0##kafka_output_test":
{
"category": "file",
"log_type": "json_log",
"log_path": "/root/bin/input_data",
"file_pattern": "json.log",
"create_time": 1631018645,
"defaultEndpoint": "",
"delay_alarm_bytes": 0,
"delay_skip_bytes": 0,
"discard_none_utf8": false,
"discard_unmatch": false,
"docker_exclude_env":
{},
"docker_exclude_label":
{},
"docker_file": false,
"docker_include_env":
{},
"docker_include_label":
{},
"enable": true,
"enable_tag": false,
"file_encoding": "utf8",
"filter_keys":
[],
"filter_regs":
[],
"group_topic": "",
"plugin":
{
"processors":
[
{
"detail": {
"SplitSep": "",
"SplitKey": "content"
},
"type": "processor_split_log_string"
},
{
"detail":
{
"ExpandConnector": "",
"ExpandDepth": 1,
"SourceKey": "content",
"KeepSource": false
},
"type": "processor_json"
}
],
"flushers":
[
{
"type": "flusher_kafka",
"detail":
{
"Brokers":
[
"localhost:9092"
],
"Topic": "logtail-flusher-kafka"
}
}
]
},
"local_storage": true,
"log_tz": "",
"max_depth": 10,
"max_send_rate": -1,
"merge_type": "topic",
"preserve": true,
"preserve_depth": 1,
"priority": 0,
"raw_log": false,
"aliuid": "",
"region": "",
"project_name": "",
"send_rate_expire": 0,
"sensitive_keys":
[],
"shard_hash_key":
[],
"tail_existed": false,
"time_key": "",
"timeformat": "",
"topic_format": "none",
"tz_adjust": false,
"version": 1,
"advanced":
{
"force_multiconfig": false,
"tail_size_kb": 1024
}
}
}
}

@linrunqi08
Copy link
Collaborator

linrunqi08 commented Jun 6, 2022

Thanks for your questions. Since you haven't responded for a long time, this issue will be closed. If you have any questions, please reopen this issue to tell us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants