with builtins; { resource = { graylog_input = { nginx_access_logs = { title = "nginx access log"; # https://javadoc.io/doc/org.graylog2/graylog2-inputs/latest/index.html type = "org.graylog2.inputs.syslog.udp.SyslogUDPInput"; global = true; attributes = toJSON ({ allow_override_date = true; bind_address = "0.0.0.0"; expand_structured_data = false; force_rdns = false; number_worker_threads = 4; port = 12304; recv_buffer_size = 1048576; store_full_message = false; }); }; nginx_error_logs = { title = "nginx error log"; # https://javadoc.io/doc/org.graylog2/graylog2-inputs/latest/index.html type = "org.graylog2.inputs.syslog.udp.SyslogUDPInput"; global = true; attributes = toJSON ({ allow_override_date = true; bind_address = "0.0.0.0"; expand_structured_data = false; force_rdns = false; number_worker_threads = 4; port = 12305; recv_buffer_size = 1048576; store_full_message = false; }); }; }; graylog_input_static_fields = { nginx_access_logs = { input_id = "\${graylog_input.nginx_access_logs.id}"; fields = { from_nginx = true; nginx_error = false; nginx_access = true; }; }; nginx_error_logs = { input_id = "\${graylog_input.nginx_error_logs.id}"; fields = { from_nginx = true; nginx_error = true; nginx_access = false; }; }; }; }; }