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

[FR] Openweathermap plugin for Telegraf - addition of 'wind_gust' metric #16410

Open
jedd opened this issue Jan 18, 2025 · 0 comments
Open

[FR] Openweathermap plugin for Telegraf - addition of 'wind_gust' metric #16410

jedd opened this issue Jan 18, 2025 · 0 comments
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@jedd
Copy link

jedd commented Jan 18, 2025

Use Case

Greetings,

Openweathermap plugin currently pulls two wind metrics - wind_speed and wind_direction, but the upstream API also offers the wind_gust value.

Sample output from curling the openweather api:

 "wind": {  
   "speed": 6.43,  
   "deg": 155,  
   "gust": 16.41  
 },  

Adding this to the telegraf openweathermap plugin looks to require small additions in three places in https://github.com/influxdata/telegraf/blob/master/plugins/inputs/openweathermap/openweathermap.go - a single line entry after each of the three existing

		"wind_degrees": e.Wind.Deg,
		"wind_speed":   e.Wind.Speed,

definitions, with wind_gust as the API returned key name, and e.Wind.Gust as the new internal variable.

And one line addition to: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/openweathermap/types.go - adding a new entry after:

	Wind struct {
		Deg   float64 `json:"deg"`
		Speed float64 `json:"speed"`

I'd assume same type (float64 and speed) as 'Wind.Speed'.

I'd guess some adds to the output samples and the /testcases/ directory, but I'm not a go lang guy, so I'm going to avoid guessing about those requirements.

thanks,
Jedd.

Expected behavior

n/a

Actual behavior

n/a

Additional info

No response

@jedd jedd added the feature request Requests for new plugin and for new features to existing plugins label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

1 participant