Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Logstash IntelliJ Idea Filetype

Very Basic & rudimentary Logstash syntax highlighting

MacOS

Stop IntelliJ IDEA

curl https://gist.githubusercontent.com/kireevco/438d104a1f0cfba71bee/raw/ca292ff8d6dd535d68b9002a50e5293529d48a1b/Logstash.xml > ~/Library/Preferences/IntelliJIdea15/filetypes/Logstash.xml
<filetype binary="false" description="Logstash Config" name="Logstash Config">
<highlighting>
<options>
<option name="LINE_COMMENT" value="#" />
<option name="COMMENT_START" value="" />
<option name="COMMENT_END" value="" />
<option name="HEX_PREFIX" value="" />
<option name="NUM_POSTFIXES" value="" />
<option name="HAS_BRACES" value="true" />
<option name="HAS_BRACKETS" value="true" />
<option name="HAS_PARENS" value="true" />
<option name="HAS_STRING_ESCAPES" value="true" />
</options>
<keywords keywords="filter;input;output" ignore_case="false" />
<keywords2 keywords="aggregate;alter;anonymize;avro;beats;boundary;cef;cidr;cipher;circonus;clone;cloudfront;cloudtrail;cloudwatch;collate;collectd;compress_spooler;couchdb_changes;csv;datadog;datadog_metrics;date;de_dot;dissect;dns;dots;drop;drupal_dblog;edn;edn_lines;elapsed;elasticsearch;email;environment;es_bulk;eventlog;exec;extractnumbers;file;fingerprint;fluent;ganglia;gelf;gemfire;generator;geoip;github;google_bigquery;google_cloud_storage;graphite;graphtastic;grok;gzip_lines;heartbeat;heroku;hipchat;http;http_poller;i18n;imap;influxdb;irc;jdbc;jira;jmx;json;json_encode;json_lines;juggernaut;kafka;kinesis;kv;librato;line;log4j;loggly;lumberjack;meetup;metaevent;metriccatcher;metricize;metrics;mongodb;msgpack;multiline;mutate;nagios;nagios_nsca;netflow;newrelic;nmap;oldlogstashjson;opentsdb;oui;pagerduty;pipe;plain;protobuf;prune;punct;puppet_facter;rabbitmq;rackspace;range;redis;redmine;relp;riak;riemann;rss;ruby;rubydebug;s3;s3_plain;salesforce;sflow;sleep;snmptrap;sns;solr_http;split;sqlite;sqs;statsd;stdin;stdout;stomp;syslog;syslog_pri;tcp;throttle;tld;translate;truncate;twitter;udp;unix;urldecode;useragent;uuid;varnishlog;webhdfs;websocket;wmi;xml;xmpp;yaml;zabbix;zenoss;zeromq" />
<keywords3 keywords="absolute_healthcheck_path;access_key_id;account_id;ack;acks;action;add_field;add_metadata_from_env;add_tag;add_tag_on_timeout;add_usernames;additional_codecs;address;after_count;aggregate_maps_path;alert_type;algorithm;all_fields;allow_duplicate_values;allow_time_override;always_reconnect;annotation;api_key;api_token;api_version;app;app_name;application_name;appname;arguments;arn;assigned_to_id;assignee;attachments;authentication;authfile;auto;auto_commit_interval_ms;auto_delete;auto_flush_interval;auto_offset_reset;autogenerate_column_names;automatic_recovery;automatic_retries;aws_credentials_file;backup_add_prefix;backup_to_bucket;backup_to_dir;base64;base64encode;batch;batch_count;batch_events;batch_number;batch_size;batch_timeout;before_count;biased;blacklist_names;blacklist_values;body;bootstrap_servers;break_on_match;bsubtype;btags;btype;bucket;bucket_props;buffer_memory;buffer_size;bulksize;ca_file;cacert;cache_name;cache_save_path;cache_size;cache_ttl;cache_xml_file;can_retry;canned_acl;catch_all;categorie_id;cc;channels;charset;check_crcs;check_interval;checkpoint_interval_seconds;chunksize;cipher_padding;cipher_suites;claim;class_name;clean_run;clear_interval;client_cert;client_id;client_inactivity_timeout;client_key;client_secret;clones;close_older;coalesce;code;codec;coerce_values;collection;color;columns;columns_charset;combined;command;commandfile;community;compress_level;compression;compression_type;concatenate_sources;condrewrite;condrewriteother;congestion_interval;congestion_threshold;connect_retry_interval;connect_timeout;connection_retry_attempts;connection_retry_attempts_wait_time;connection_timeout;connections_max_idle_ms;consumer_key;consumer_secret;consumer_threads;content_type;contenttype;context;convert;convert_datatype;cookies;count;counter;create_if_deleted;csv_options;csv_schema;custom_fields;data_points;data_timeout;data_type;database;databases;dataset;date_happened;date_pattern;db;dd_tags;debug;decorate_events;decrement;default_keys;delete;deleter_interval_secs;delimiter;description;destination;details;device;dictionary;dictionary_path;dimensions;dir_mode;discover_interval;doc_as_upsert;docinfo;docinfo_fields;docinfo_target;document_id;document_type;domain;drop_invalid;drop_original_event;durable;emit_hosts;emit_ports;emit_scan_metadata;emit_traceroute_links;enable_auto_commit;enable_metric;enable_search;enable_sort;enable_ssl;encoding;end_of_task;end_tag;end_time;environment;error_file;event_type;eventstatus;every;exact;exchange;exchange_type;exclude;exclude_fields;exclude_internal_topics;exclude_keys;exclude_metrics;exclude_pattern;exclude_tables;exclusive;expunge;facility;facility_labels;failed_cache_size;failed_cache_ttl;failure_type_logging_whitelist;fallback;fetch_count;fetch_max_wait_ms;fetch_min_bytes;field;field_dimensions;field_metricname;field_namespace;field_split;field_unit;field_value;fields;fields_are_metrics;file_mode;filename_failure;filters;fixed_version_id;flush_interval;flush_interval_secs;flush_size;folder;follow_redirects;followed_by_tags;follows;force_array;force_content;force_unlink;format;from;full_message;full_tweet;gauge;generateId;get_stats;group;group_id;groupid;gsub;gzip;headers;healthcheck_path;heartbeat;heartbeat_interval_ms;hit_cache_size;hit_cache_ttl;host;hosts;hostsfile;htmlbody;http_method;id;id_field;idle_flush_time;ignore_attachments;ignore_metadata;ignore_older;ignore_older_than;ignore_retweets;ignore_unknown_values;incident_key;include_brackets;include_codec_tag;include_flowset_id;include_keys;include_metrics;include_path;increment;index;indices;init;initial_sequence;insert_key;integration;interest_regexp;interface_cache_size;interface_cache_ttl;interpolate;interval;ip;ipfix_definitions;isodate;issuetypeid;iv_random_length;jaas_path;jdbc_connection_string;jdbc_default_timezone;jdbc_driver_class;jdbc_driver_library;jdbc_fetch_size;jdbc_page_size;jdbc_paging_enabled;jdbc_password;jdbc_password_filepath;jdbc_pool_timeout;jdbc_user;jdbc_validate_connection;jdbc_validation_timeout;join;json_schema;keep_empty_captures;keep_id;keep_revision;keepalive;kerberos_config;key;key_deserializer_class;key_name;key_pad;key_password;key_path;key_serializer;key_size;keystore;keystore_password;keystore_type;keywords;kinesis_stream_name;languages;last_run_metadata_path;length_bytes;level;lifetime;lines;linger_ms;locale;locations;log_file_prefix;logfile;lowercase;lowercase_column_names;lowercase_headers;lru_cache_size;manage_template;map_action;map_fields;mapping;match;max_age;max_bytes;max_cipher_reuse;max_counters;max_file_size_kbytes;max_interval;max_lines;max_open_files;max_partition_fetch_bytes;max_poll_records;max_request_size;max_retries;md5_field;measurement;meetupkey;merge;message;message_format;message_key;message_max_size;messages_per_second;metadata;metadata_enabled;metadata_fetch_timeout_ms;metadata_max_age_ms;metadata_target;meter;method;metric;metric_field_name;metric_name;metric_type;metric_value;metricname;metrics;metrics_format;mode;msgid;multi_value;multiline_tag;nagios_host;nagios_level;nagios_service;nagios_status;name;named_captures_only;nameserver;namespace;namespaces;nan_handling;nan_tag;nan_value;nb_thread;negate;nested;nested_object_separator;netflow_definitions;network;new_event_on_match;nick;nodes;oauth_token;oauth_token_secret;open_timeout;optional_removed_field;order;org_id;output_format;override;overwrite;parameters;parent;parent_issue_id;partition_assignment_strategy;passive;password;path;pattern;patterns_dir;patterns_files_glob;pdurl;percentage;percentiles;period;periodic_flush;persistent;pipeline;poll_timeout_ms;polling_frequency;pool_max;pool_max_per_route;port;post_string;pre_string;prefetch_count;prefix;priority;priority_id;private_key;procid;product;project_id;projectid;proto;protocol;proxy;proxy_address;proxy_host;proxy_password;proxy_port;proxy_protocol;proxy_uri;proxy_user;prune_intervals;public_key;publish_boot_message_arn;push_map_as_event_on_timeout;push_previous_map_as_event;query;query_template;queue;queue_size;quiet;quote_char;ranges;rate_limit_reset_in;rates;read_timeout;real;receive_buffer_bytes;reconnect;reconnect_backoff_ms;reconnect_delay;reconnect_interval;record_last_run;recursive;refresh_interval;regex;regexes;region;region_name;remap;remove_field;remove_namespaces;remove_tag;rename;replace;replay;replyto;reporter;request_timeout;request_timeout_ms;resend_on_failure;resolve;response_headers;restore;result_size;resurrect_delay;retention_policy;retries;retry_backoff_ms;retry_count;retry_delay;retry_initial_interval;retry_interval;retry_known_errors;retry_max_interval;retry_non_idempotent;retry_on_conflict;retry_times;reverse;rfc;riemann_event;room_id;rooms;rotation_strategy;routing;sample_rate;sasl_kerberos_service_name;sasl_mechanism;schedule;schema_uri;script;script_lang;script_type;script_var_name;scripted_upsert;scroll;secret_access_key;secret_token;secure;security_level;security_protocol;security_token;send_as_tags;send_buffer_bytes;send_nsca_bin;send_nsca_config;sender;sent_timestamp_field;separator;sequel_opts;sequence_path;serialization;server_side_encryption;server_side_encryption_algorithm;service_account;service_key;session_timeout_ms;session_token;set;severity;severity_labels;sfdc_fields;sfdc_filters;sfdc_object_name;ship_metadata;ship_tags;short_message;shuffle_hosts;signature;signature_version;sincedb_path;sincedb_write_interval;single_file_per_thread;size;size_file;skip_empty_columns;skip_on_invalid_json;slope;snappy_bufsize;snappy_format;sniffing;sniffing_delay;snmp_community;snmp_interface;socket_timeout;sockopt;solr_url;sort;source;source_type_name;sourcehost;split;spool_size;spreadsheet_safe;sql_log_level;ssekms_key_id;ssl;ssl_cacert;ssl_cert;ssl_certificate;ssl_certificate_authorities;ssl_certificate_password;ssl_certificate_path;ssl_certificate_validation;ssl_certificate_verification;ssl_enable;ssl_extra_chain_certs;ssl_handshake_timeout;ssl_key;ssl_key_passphrase;ssl_key_password;ssl_keystore_location;ssl_keystore_password;ssl_keystore_type;ssl_opts;ssl_truststore_location;ssl_truststore_password;ssl_truststore_type;ssl_verify;ssl_verify_mode;ssl_version;standby_host;standby_port;start_position;start_tag;start_time;stat_interval;statement;statement_filepath;statistics;stats_interval;status_id;storage_class;store_xml;strip;strip_attachments;strip_leading_underscore;subject;subscription_retry_interval_seconds;summary;suppress_empty;syslog_pri_field_name;table_prefix;table_separator;tag;tag_on_failure;tag_on_timeout;tags;target;task_id;temp_directory;temp_file_prefix;template;template_name;template_overwrite;temporary_directory;terminator;text;threads;time;time_file;time_precision;timeframe;timeout;timeout_code;timeout_millis;timeout_tags;timeout_task_id_field;timer;timestamp_field;timezone;timing;title;tls_max_version;tls_min_version;to;to_underscores;token;topic;topic_id;topics;topics_pattern;topology;tracker_id;tracking_column;tracking_column_type;transform_key;transform_value;transliterate;trigger_notify;trim;trimkey;truststore;truststore_password;truststore_type;ttl;type;typesdb;uniform;unique_id_field;unit;units;update;upload_queue_size;upload_workers_count;uploader_interval_secs;uppercase;upsert;uri;url;urlname;urls;use_column_value;use_event_fields_for_data_points;use_httpfs;use_labels;use_proxy;use_samples;use_ssl;use_test_sandbox;use_tls;user;username;users;validate_after_inactivity;validate_credentials_on_root_bucket;value;value_deserializer_class;value_field_name;value_serializer;value_split;vendor;venueid;verify_cert;verify_mode;verify_ssl;version;version_type;versions;vhost;via;what;whitelist_names;whitelist_values;workers;xpath;yamlmibdir;zabbix_host;zabbix_key;zabbix_server_host;zabbix_server_port;zabbix_value" />
<keywords4 keywords="and;else;else if;if;in;nand;not in;or;xor" />
</highlighting>
<extensionMap>
<mapping pattern="input_*.conf" />
<mapping pattern="output_*.conf" />
<mapping pattern="filter_*.conf" />
</extensionMap>
</filetype>
@AutomationD

This comment has been minimized.

Copy link
Owner Author

AutomationD commented Oct 2, 2017

@atais

This comment has been minimized.

Copy link

atais commented Oct 21, 2017

In my case to install it was:

cd ~/Library/Preferences/IntelliJIdea2017.2/
mkdir filetypes
cd filetypes
wget https://gist.githubusercontent.com/kireevco/438d104a1f0cfba71bee/raw/9f3b9fc2c815169f0540db8cae1e012b58742a20/Logstash.xml 

and remember to name your files like:

  • input_*.conf
  • output_*.conf
  • filter_*.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.