+++ /dev/null
-#!/usr/bin/env python
-#
-# Authors:
-# rafael@e-mc2.net / https://e-mc2.net/
-#
-# Copyright (c) 2016-2017 USIT-University of Oslo
-#
-# get_webapps_instances.py is free software: you can redistribute
-# it and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation, either version
-# 3 of the License, or (at your option) any later version.
-#
-# get_webapps_instances.py is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with sms_send. If not, see <http://www.gnu.org/licenses/>.
-#
-
-import os
-import sys
-import json
-import requests
-
-# Zabbix-mgmt
-zabbix_mgmt_url = 'http://zabbix-mgmt.uio.no/zabbix/V2'
-
-# ############################################
-# get_webapps_servers()
-# ############################################
-
-def get_webapp_instances(application):
-
- try:
-
- request_data = requests.get(zabbix_mgmt_url + "/" + application + ".json")
-
- if request_data.status_code != 200:
- sys.exit(1)
-
- autodiscovery_data = request_data.content
- print autodiscovery_data
-
- except Exception:
- sys.exit(1)
-
-
-# ############################################
-# Main
-# ############################################
-
-if __name__ == '__main__':
-
- try:
- application = sys.argv[1]
- get_webapp_instances(application)
-
- except Exception, e:
- sys.exit(1)