tis-check_mkagent 1.4.0.2849-1

  • package : tis-check_mkagent
  • version : 1.4.0.2849-1
  • description : Agent Check_mk for windows
  • maintainer : Simon Fonteneau
  • date : 2017-11-10 16:46:51
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20171110-164648
  • min_os_version :
  • min_wapt_version :

setup.py

# -*- coding: utf-8 -*-
from setuphelpers import *
import socket
uninstallkey = []

def install():
    print('installing tis-check_mkagent')
    install_msi_if_needed('check_mk_agent.msi')

    dnsname = 'nagios'
    port = '6556'


    if windows_version() < Version('6') :
        #XP
        run('netsh.exe firewall add portopening name="check_mkagent" port=%s protocol=TCP profile=ALL' % port)
    else:
        run('netsh advfirewall firewall add rule name="check_mkagent %s" dir=in action=allow protocol=TCP localport=%s ' % (port,port))
"""
        ip_list = []
        ais = socket.getaddrinfo(dnsname,0,0,0,0)
        for result in ais:
          ip_list.append(result[-1][0])
        ip_list = list(set(ip_list))
        for ip in ip_list:
            print 'unlock %s:%s in firewall' % (ip,port)
            run('netsh advfirewall firewall add rule name="check_mkagent %ip " dir=in action=allow protocol=TCP localport=%s remoteip=%s' %(ip,port,ip))
"""
    

manifest

Couldn't retrieve manifest.