Boerderij / Varken

Standalone application to aggregate data from the Plex ecosystem into InfluxDB using Grafana as a frontend
MIT License
1.14k stars 132 forks source link

[Feature Request] Unifi Integration #79

Closed staticgroup closed 5 years ago

staticgroup commented 5 years ago

Hey Guys, This project is great, Can we somehow integrate unifi applicances in lieu of cisco asa ?

thanks steve

dirtycajunrice commented 5 years ago

I have the UniFi controller installed as a service. It looks like the api documentation is solely a reverse engineer project which does worry me a bit but i can play around with it. The currently reverse engineered documentation is here. I will tentatively approve this on the grounds that if it is possible to pull I think it would be good, but after I spend some time digging, i might find that this is not documented well enough.

In addition, i do not use it as a gateway so i might have some api responses i cannot reproduce. In the event that this is the case, i will need assistance with queries from yourself or someone with the hardware.

cheers!

staticgroup commented 5 years ago

Hey Nicolas ,

Not a problem I am happy to test with my setup as I have a full unifi setup.

Thank you

Steve


From: "Nicholas St. Germain" notifications@github.com Sent: Thursday, 3 January 2019 4:09 am To: Boerderij/Varken Cc: Steven Connery; Author Subject: Re: [Boerderij/Varken] Unifi Integration[Feature Request] (#79)

I have the UniFi controller installed as a service. It looks like the api documentation is solely a reverse engineer project which does worry me a bit but i can play around with it. The currently reverse engineered documentation is herehttps://ubntwiki.com/products/software/unifi-controller/api. I will tentatively approve this on the grounds that if it is possible to pull I think it would be good, but after I spend some time digging, i might find that this is not documented well enough.

In addition, i do not use it as a gateway so i might have some api responses i cannot reproduce. In the event that this is the case, i will need assistance with queries from yourself or someone with the hardware.

cheers!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Boerderij/Varken/issues/79#issuecomment-450923176, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQGT2iIwP8-JYAeu8bptLC8GIaV48kYtks5u_OffgaJpZM4ZmZFa.

dirtycajunrice commented 5 years ago

Ive found https://github.com/Art-of-WiFi/UniFi-API-browser/blob/master/vendor/art-of-wifi/unifi-api-client/src/Client.php#L2029 which i believe shows the total bandwidth but as i dont have the gateway i cannot see it. can you give me screenshots of https://unifiIP:8443/manage/site/default/statistics/dpi and any other screen that shows current bandwidth for your gateway? Also, we could do this much more efficiently if i could get you on discord after 6PM CST!

staticgroup commented 5 years ago

Hey Nicholas,

That should the DPI Screen, Which is the useage of my gateway IE: 2tb on torrents, 2tb on xbox updates etc

https://unifi:8443/manage/site/default/dashboard this shows the dash board (bandiwth usage and hadware usage

The unifi controller server does offer snmp readouts? That may help?

I am also a member of the beta community who might be interested?

There is also this existing dashboard Maybe with there permission(not sure if open source) We can use that data?

https://grafana.com/dashboards/6885

I am online at that time.

Name on discord is corporatesteve

I am in Australia in Sydney.

From: Nicholas St. Germain notifications@github.com Sent: Thursday, 3 January 2019 6:26 PM To: Boerderij/Varken Varken@noreply.github.com Cc: Steven Connery steven@staticgroup.com.au; Author author@noreply.github.com Subject: Re: [Boerderij/Varken] [Feature Request] Unifi Integration (#79)

Ive found https://github.com/Art-of-WiFi/UniFi-API-browser/blob/master/vendor/art-of-wifi/unifi-api-client/src/Client.php#L2029 which i believe shows the total bandwidth but as i dont have the gateway i cannot see it. can you give me screenshots of https://unifiIP:8443/manage/site/default/statistics/dpi and any other screen that shows current bandwidth for your gateway? Also, we could do this much more efficiently if i could get you on discord after 6PM CST!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Boerderij/Varken/issues/79#issuecomment-451070809, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQGT2k80zb71U_UJlYh_EDu-_vh843amks5u_bBvgaJpZM4ZmZFa.

dirtycajunrice commented 5 years ago

That was a link to your controller but not an image. Keep in mind we don’t want metrics for all transferred data in the house as that’s not relevant or helpful. We are looking for wan in/out speed and possibly data transferred by wan for x time. That dashboard just looks at exported data. So wouldn’t be helpful to us. We will never poll snmp, it’s not 2002 ;)

If you can send pictures, wonderful. If not and would rather do it on discord that’s fine too!

Thanks

Sent with GitHawk

staticgroup commented 5 years ago

Hahaha . That's funny . I am happy to discord. Let's figure out a time .

Thank you

Many Thanks,

Steven Connery

Steven Connery

Owner

Static Group

Ph: 1300 366 638<tel:1300%20366%20638>

URL: www.staticcomputers.comhttp://www.staticcomputers.com// www.staticgroup.com.au

––––––––––––––––––––––––––––––

Unencrypted electronic mail is not secure and may not be authentic. If you have any doubts as to the contents please telephone to confirm.

This electronic transmission including any attachments is intended only for those to whom it is addressed. It may contain copyright material or information that is confidential, privileged or exempt from disclosure by law. Any claim to privilege is not waived or lost by reason of mistaken transmission of this information. If you are not the intended recipient you must not distribute or copy this transmission and should please notify the sender. Your costs for doing this will be reimbursed by the sender.

We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment.


From: "Nicholas St. Germain" notifications@github.com Sent: Friday, 4 January 2019 1:49 am To: Boerderij/Varken Cc: Steven Connery; Author Subject: Re: [Boerderij/Varken] [Feature Request] Unifi Integration (#79)

That was a link to your controller but not an image. Keep in mind we don’t want metrics for all transferred data in the house as that’s not relevant or helpful. We are looking for wan in/out speed and possibly data transferred by San for x time. That dashboard just looks at exported data. So wouldn’t be helpful to us. We will never poll snmp, it’s not 2002 ;)

If you can send pictures, wonderful. If not and would rather do it on discord that’s fine too!

Thanks

Sent with GitHawkhttp://githawk.com

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Boerderij/Varken/issues/79#issuecomment-451164684, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQGT2gwddiBWrRMitl4_upluBhzHVIjjks5u_hhggaJpZM4ZmZFa.

staticgroup commented 5 years ago

Hey mate,

Sorry got busy at work . Did we get anywhere with this?

Can you add me on discord , or I am happy to add you?

Thanks,

From: Nicholas St. Germain notifications@github.com Sent: Tuesday, 8 January 2019 3:30 AM To: Boerderij/Varken Varken@noreply.github.com Cc: Steven Connery steven@staticgroup.com.au; Author author@noreply.github.com Subject: Re: [Boerderij/Varken] [Feature Request] Unifi Integration (#79)

Closed #79https://github.com/Boerderij/Varken/issues/79.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Boerderij/Varken/issues/79#event-2058031749, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQGT2ui8YhZBOwnaCgldzvhOW2wgBvV6ks5vA3YcgaJpZM4ZmZFa.

samwiseg0 commented 5 years ago

It has been added. It is currently in nightly for testing.

johntdyer commented 5 years ago

What is the USG_Name ? I have tried half a dozen names and none work...

root@ubuntu:/opt/Varken# /opt/Varken/varken-venv/bin/python /opt/Varken/Varken.py
2019-03-18 23:09:07 : INFO : Varken : Starting Varken...
2019-03-18 23:09:07 : INFO : Varken : Data folder is "/opt/Varken/data"
2019-03-18 23:09:07 : INFO : Varken : Linux 4.15.0-45-generic (#48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 - Ubuntu 18.04 bionic)
2019-03-18 23:09:07 : INFO : Varken : Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
2019-03-18 23:09:07 : INFO : Varken : Varken v1.6.6-master
2019-03-18 23:09:07 : INFO : iniparser : SONARR_SERVER_IDS disabled.
2019-03-18 23:09:07 : INFO : iniparser : RADARR_SERVER_IDS disabled.
2019-03-18 23:09:07 : INFO : iniparser : OMBI_SERVER_IDS disabled.
2019-03-18 23:09:07 : INFO : helpers : TAUTULLI_SERVER_IDS : [1]
2019-03-18 23:09:07 : INFO : iniparser : SICKCHILL_SERVER_IDS disabled.
2019-03-18 23:09:07 : INFO : helpers : UNIFI_SERVER_IDS : [1]
2019-03-18 23:09:07 : INFO : dbmanager : Influxdb version: 1.7.4
2019-03-18 23:09:07 : INFO : helpers : Opening persistent connection to GeoLite2 DB...
2019-03-18 23:09:08 : INFO : __init__ : Running *all* 4 jobs with 0s delay inbetween
2019-03-18 23:09:08 : INFO : __init__ : Running job Every 12 to 24 hours do put(<bound method GeoIPHandler.update of <varken.helpers.GeoIPHandler object at 0x7f641e4b2c18>>) (last run: [never], next run: 2019-03-19 12:09:07)
2019-03-18 23:09:08 : INFO : __init__ : Running job Every 30 seconds do put(<bound method TautulliAPI.get_activity of <tautulli-1>>) (last run: [never], next run: 2019-03-18 23:09:37)
2019-03-18 23:09:08 : INFO : __init__ : Running job Every 3600 seconds do put(<bound method TautulliAPI.get_stats of <tautulli-1>>) (last run: [never], next run: 2019-03-19 00:09:07)
2019-03-18 23:09:08 : INFO : __init__ : Running job Every 300 seconds do put(<bound method UniFiAPI.get_usg_stats of <unifi-1>>) (last run: [never], next run: 2019-03-18 23:14:08)
2019-03-18 23:09:08 : INFO : helpers : This url doesnt even resolve: http://********:8181/api/v2?apikey=********b****************root&cmd=get_activity
2019-03-18 23:09:08 : INFO : helpers : This url doesnt even resolve: http://********:8181/api/v2?apikey=********b****************root&cmd=get_libraries
2019-03-18 23:09:08 : ERROR : unifi : Could not find a USG named Home from your UniFi Controller
samwiseg0 commented 5 years ago

@johntdyer issues is not the place for support. Please use Discord.