Skip to content

Commit

Permalink
added sickchill. fixes #48
Browse files Browse the repository at this point in the history
  • Loading branch information
dirtycajunrice committed Dec 16, 2018
1 parent 056d211 commit 78b7765
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 92 deletions.
9 changes: 8 additions & 1 deletion Varken.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from varken.tautulli import TautulliAPI
from varken.radarr import RadarrAPI
from varken.ombi import OmbiAPI
from varken.sickchill import SickChillAPI
from varken.cisco import CiscoAPI
from varken.dbmanager import DBManager
from varken.varkenlogger import VarkenLogger
Expand Down Expand Up @@ -110,14 +111,20 @@ def threaded(job):
if server.request_total_counts:
schedule.every(server.request_total_run_seconds).seconds.do(threaded, OMBI.get_all_requests)

if CONFIG.sickchill_enabled:
for server in CONFIG.sickchill_servers:
SICKCHILL = SickChillAPI(server, DBMANAGER)
if server.get_missing:
schedule.every(server.get_missing_run_seconds).seconds.do(threaded, SICKCHILL.get_missing)

if CONFIG.ciscoasa_enabled:
for firewall in CONFIG.ciscoasa_firewalls:
ASA = CiscoAPI(firewall, DBMANAGER)
schedule.every(firewall.get_bandwidth_run_seconds).seconds.do(threaded, ASA.get_bandwidth)

# Run all on startup
SERVICES_ENABLED = [CONFIG.ombi_enabled, CONFIG.radarr_enabled, CONFIG.tautulli_enabled,
CONFIG.sonarr_enabled, CONFIG.ciscoasa_enabled]
CONFIG.sonarr_enabled, CONFIG.ciscoasa_enabled, CONFIG.sickchill_enabled]
if not [enabled for enabled in SERVICES_ENABLED if enabled]:
exit("All services disabled. Exiting")
schedule.run_all()
Expand Down
25 changes: 18 additions & 7 deletions data/varken.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ radarr_server_ids = 1,2
tautulli_server_ids = 1
ombi_server_ids = 1
ciscoasa_firewall_ids = false
sickchill_server_ids = false

[influxdb]
url = influxdb.domain.tld
Expand All @@ -23,15 +24,15 @@ url = tautulli.domain.tld:8181
fallback_ip = 0.0.0.0
apikey = xxxxxxxxxxxxxxxx
ssl = false
verify_ssl = true
verify_ssl = false
get_activity = true
get_activity_run_seconds = 30

[sonarr-1]
url = sonarr1.domain.tld:8989
apikey = xxxxxxxxxxxxxxxx
ssl = false
verify_ssl = true
verify_ssl = false
missing_days = 7
missing_days_run_seconds = 300
future_days = 1
Expand All @@ -43,7 +44,7 @@ queue_run_seconds = 300
url = sonarr2.domain.tld:8989
apikey = yyyyyyyyyyyyyyyy
ssl = false
verify_ssl = true
verify_ssl = false
missing_days = 7
missing_days_run_seconds = 300
future_days = 1
Expand All @@ -55,7 +56,7 @@ queue_run_seconds = 300
url = radarr1.domain.tld
apikey = xxxxxxxxxxxxxxxx
ssl = false
verify_ssl = true
verify_ssl = false
queue = true
queue_run_seconds = 300
get_missing = true
Expand All @@ -65,7 +66,7 @@ get_missing_run_seconds = 300
url = radarr2.domain.tld
apikey = yyyyyyyyyyyyyyyy
ssl = false
verify_ssl = true
verify_ssl = false
queue = true
queue_run_seconds = 300
get_missing = true
Expand All @@ -75,17 +76,27 @@ get_missing_run_seconds = 300
url = ombi.domain.tld
apikey = xxxxxxxxxxxxxxxx
ssl = false
verify_ssl = true
verify_ssl = false
get_request_type_counts = true
request_type_run_seconds = 300
get_request_total_counts = true
request_total_run_seconds = 300

[sickchill-1]
url = sickchill.domain.tld:8081
apikey = xxxxxxxxxxxxxxxx
ssl = false
verify_ssl = false
get_missing = true
get_missing_run_seconds = 300



[ciscoasa-1]
url = firewall.domain.tld
username = cisco
password = cisco
outside_interface = WAN
ssl = false
verify_ssl = true
verify_ssl = false
get_bandwidth_run_seconds = 300
Loading

0 comments on commit 78b7765

Please sign in to comment.