Steps
www.wunderground.com/weather/api/
NOTES
In the Readme.txt, it incorrectly states to use "state" for you conditions config. You must use "country" for both states and countries.
Example:
JSON Configuration (USA - Dallas, Texas): { "city": "Dallas", "country": "TX" }
Searching Data
Here are a few ways to search for your new Weather Data.
The default sourcetype is wunderground, and each input has it's own source in the style of wunderground:. Each different Wunderground API feature presents its data differently, but all of it is returned in JSON. The TA-wunderground automatically extracts the fields, so here are few examples with that knowledge.
Time Chart Some Stuff
Assuming you are using the api feature "conditions" here is a quick search that timecharts some of the returned data.
sourcetype=wunderground source=wunderground:city-conditions |timechart span=1h avg(relative_humidity) as RH avg(temp_f) as "Temp(f)" avg(wind_mph) as "Wind Speed (mph)"
Here is a search for a "current conditions" dashboard
sourcetype=wunderground source=wunderground:city-conditions|tail 1|stats latest(relative_humidity) as RH latest(current_observation.temp_f) as "Temp (F)"
And here's one for fun! (Thanks jspears!)
sourcetype="wunderground" source=wunderground:city-conditions weather!=NULL|timechart count by weather
This version removes Compatibility for Splunk 5.0. I fixed the historical download to have the ability to enter a date range. I removed the refresh interval parameter to avoid confusion post 6.x.
Added the PWS option! Configure it like this: {"pws": "PWS_ID" } with the API Feature "PWS"!
Fixed the History Feature to properly consume data. From/To dates will be coming in next release.
Updated to fix compatibility with Splunk 6.0.
Changes the time parsing for current conditions. If observation epoch is present, will use that as the index time for more accurate statistics.
Removed the API key from the default inputs.conf. Replace with your own to see correct data.
Version 0.2
Fixed an exception issue with the API Url not being available. If the Wunderground API was unavailable, the Data Input's Python process would then exit with code 1. The Input will now retry 5 times with an exponential backoff. If the url is still unavailable, the Python process will go back to sleep for the configured time.
Updated the reference in the schema to point to the proper README.txt file.
As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.