Hi,
I have the below example XML to scrape:
Cook 738 3560 0 Food1 OPEN 1800 4 Food2 OPEN 1800 4 Food3 OPEN 1800 4 100
I am extracting the data I want with the following CSS Selector:
cook_temp,cook_set,food1_temp,food1_set,output_percent
This results in the following events:
response_size="1235" match_2="3560" match_1="725" match="725" match="3560" match="OPEN" match="1800" match="100" match_5="100" request_time="577.230930328" match_3="OPEN" match_4="1800" encoding="ascii" response_code="200" raw_match_count="5"
response_size="1235" match_2="3560" match_1="721" match="721" match="3560" match="OPEN" match="1800" match="100" match_5="100" request_time="567.966938019" match_3="OPEN" match_4="1800" encoding="ascii" response_code="200" raw_match_count="5"
response_size="1235" match_2="3560" match_1="721" match="721" match="3560" match="OPEN" match="1800" match="100" match_5="100" request_time="565.255880356" match_3="OPEN" match_4="1800" encoding="ascii" response_code="200" raw_match_count="5"
response_size="1235" match_2="3560" match_1="722" match="722" match="3560" match="OPEN" match="1800" match="100" match_5="100" request_time="576.737880707" match_3="OPEN" match_4="1800" encoding="ascii" response_code="200" raw_match_count="5"
response_size="1235" match_2="3560" match_1="721" match="721" match="3560" match="OPEN" match="1800" match="100" match_5="100" request_time="572.259187698" match_3="OPEN" match_4="1800" encoding="ascii" response_code="200" raw_match_count="5"
response_size="1235" match_2="3560" match_1="721" match="721" match="3560" match="OPEN" match="1800" match="100" match_5="100" request_time="569.040060043" match_3="OPEN" match_4="1800" encoding="ascii" response_code="200" raw_match_count="5"
I would like to change each match_(number) to be the name of the HTML element (COOK_TEMP, COOK_SET etc.) . I can tell that by setting the "Name Attributes" would not help me, as that's trailered to setting based on HTML attributes, not HTML elements.
Is there a way to configure this to use HTML elements?
If not, is there some editing I can do to /opt/splunk/etc/apps/website_input/bin/web_input.py to do this, as I don't mind having some "non-standard" Website Input code on my system and don't know Python that well.
Thanks in advance,
Richard.
↧