What's the best practices here? I need to have the right formats so I can do things like plot CPU usage and temperatures and have gauges and whatnot. The field names can change (or new ones appear at least) every time osquery gets updated (for queries that just do select *) or one of the configured queries gets tweaked or a new osq pack enabled... Keeping ahead of those changes on the elastic index side of things seems like a losing battle
In principle there is nothing that forces a field to be stored as string in Elasticsearch for this module, but it is true that all fields are sent as this type, so Elasticsearch automatically chooses this data type.
Something you can try is to add the convert processor to your osquery module configuration for the fields you know that should be stored as numbers.
Ahh, good tip, that will prevent some number of problems in the future. I'll have to reindex all my current data though.
As for osquery being in metricbeat, that's actually where I looked for it originally. I'd say 75% of the things I'm planning on tracking with osquery actually match the metric style thought pattern vs the log style pattern.
Removing the entire processors section gets it back up and running.
I double-checked that ignore & fail were lined up with fields, and processors was lined up with result, and the individual field lines were one indent further in, and all the indents are double spaces... So I think I have the formatting done right at least
@DPattee oh sorry, my mistake. Processors configuration must be placed at the top level configuration, in the main configuration file, and then they are applied to all events, or at the input level, so it is applied to an only input. To apply them when you are using a module, you need to override the input, something like this:
Oh that was my fault... I'd "read" that page, and a couple others, several times, but only looked at the examples. Totally missed the line that says exactly what you said.
Similarly, for Filebeat modules, you can define processors under the input section of the module definition.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.