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

RFE: Add config option to skip the event.cancel at the end of the filter flow #38

Open
axrayn opened this issue May 28, 2019 · 0 comments

Comments

@axrayn
Copy link

axrayn commented May 28, 2019

I'm using the split filter along with the logstash-input-snmp to gather SNMP data and ingest into Elastic.

In order to ingest data on a per-core, per-interface, per-filesystem basis, I'm using separate input blocks with tagging and then using the split filter based on the tags.

What I'd like to be able to do is use a single snmp input to walk a device and then use the split filter on the original event multiple times to split out the various tables of data.

e.g. Based on a rough format of:

    "device_name": "mydevice.my.domain",
    "device_version": "1.2.3.4",
    "device_uptime": 123456,
    "cpu": {
        1 => "data",
        2 => "data",
        3 => "data"
   },
   "mem": {
        1 => "data",
        2 => "data",
        3 => "data"
   },
   "int": {
        1 => "data",
        2 => "data",
        3 => "data"
   }

I could use a pipeline with:

if "cpu_split" in [tags] {
    #do cpu related parsing and cleanup (drop non cpu fields)
} else if "mem_split" in [tags] {
    #do mem related parsing and cleanup (drop non mem fields)
} else if "int_split" in [tags] {
    #do int related parsing and cleanup (drop non int fields)
} else {
    split {
        field => "cpu"
        keep_original => true
        add_tag => [ "cpu_split" ]
    }
    split {
        field => "mem"
        keep_original => true
        add_tag => [ "mem_split" ]
    }
    split {
        field => "int"
        keep_original => true
        add_tag => [ "int_split" ]
    }
   # Drop cpu/mem/int fields and parse the rest of results (or just drop{} if nothing left)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant