All Apps and Add-ons

SPL for TP-Link HS110

splunk_user11
New Member

Does anyone have any SPL for TP-Link HS110. I've setup the add-on for TP-link from Splunkbase and i'm currently ingesting the data.

But I'd like to be able to graph the data as well. Has anyone had any luck in graphing the data?

Thanks.

Labels (1)
0 Karma

to4kawa
Ultra Champion

if you provide sample logs, we can make query.

0 Karma

splunk_user11
New Member

Hi,

Here is a sample of the output, collected at 10 seconds interval. Let me know if this is has all the required fields.

device=Study-HS110 voltage_mv=238087 current_ma=291 power_mw=65276 total_wh=86318 err_code=0
device=Study-HS110 voltage_mv=237983 current_ma=300 power_mw=67613 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237460 current_ma=303 power_mw=68057 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237451 current_ma=296 power_mw=66398 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237681 current_ma=314 power_mw=70689 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=236906 current_ma=320 power_mw=71825 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=236353 current_ma=326 power_mw=73065 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=237866 current_ma=313 power_mw=70616 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238883 current_ma=331 power_mw=75130 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238164 current_ma=312 power_mw=70435 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238314 current_ma=465 power_mw=107442 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237929 current_ma=323 power_mw=73019 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237895 current_ma=329 power_mw=74385 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237514 current_ma=319 power_mw=71962 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237974 current_ma=335 power_mw=75900 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237583 current_ma=318 power_mw=71735 total_wh=86322 err_code=0

 

0 Karma

to4kawa
Ultra Champion
| makeresults
| eval _raw="device=Study-HS110 voltage_mv=238087 current_ma=291 power_mw=65276 total_wh=86318 err_code=0
device=Study-HS110 voltage_mv=237983 current_ma=300 power_mw=67613 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237460 current_ma=303 power_mw=68057 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237451 current_ma=296 power_mw=66398 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237681 current_ma=314 power_mw=70689 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=236906 current_ma=320 power_mw=71825 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=236353 current_ma=326 power_mw=73065 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=237866 current_ma=313 power_mw=70616 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238883 current_ma=331 power_mw=75130 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238164 current_ma=312 power_mw=70435 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238314 current_ma=465 power_mw=107442 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237929 current_ma=323 power_mw=73019 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237895 current_ma=329 power_mw=74385 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237514 current_ma=319 power_mw=71962 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237974 current_ma=335 power_mw=75900 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237583 current_ma=318 power_mw=71735 total_wh=86322 err_code=0"
| multikv noheader=t
| table _raw
| kv

What should I do?

0 Karma

splunk_user11
New Member

Is it possible to plot graphs similar to this?

https://github.com/jamesbarnett91/tplink-energy-monitor

I'm trying to replicate these graphs in splunk.

Thanks for your help.

 

 

0 Karma

to4kawa
Ultra Champion

wow, you should make 10 queries. you can do it.

https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchTutorial/Createnewdashboard 

 

sample:

| makeresults
| eval _raw="device=Study-HS110 voltage_mv=238087 current_ma=291 power_mw=65276 total_wh=86318 err_code=0
device=Study-HS110 voltage_mv=237983 current_ma=300 power_mw=67613 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237460 current_ma=303 power_mw=68057 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237451 current_ma=296 power_mw=66398 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=237681 current_ma=314 power_mw=70689 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=236906 current_ma=320 power_mw=71825 total_wh=86319 err_code=0
device=Study-HS110 voltage_mv=236353 current_ma=326 power_mw=73065 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=237866 current_ma=313 power_mw=70616 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238883 current_ma=331 power_mw=75130 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238164 current_ma=312 power_mw=70435 total_wh=86320 err_code=0
device=Study-HS110 voltage_mv=238314 current_ma=465 power_mw=107442 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237929 current_ma=323 power_mw=73019 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237895 current_ma=329 power_mw=74385 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237514 current_ma=319 power_mw=71962 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237974 current_ma=335 power_mw=75900 total_wh=86321 err_code=0
device=Study-HS110 voltage_mv=237583 current_ma=318 power_mw=71735 total_wh=86322 err_code=0"
| multikv noheader=t
| table _raw _time
| kv
| timechart span=1d last(total_wh) as total_wh
| eval kWH=round(total_wh/1000,2)

last 30 days(kWH) 

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...