This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use VMware::VIRuntime; | |
Opts::parse(); | |
Opts::validate(); | |
# connect server. | |
Util::connect(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim | |
import ssl | |
import atexit | |
if __name__ == '__main__': | |
# 接続情報 | |
host = 'IP or FQDN' | |
username = 'administrator@vsphere.local' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim | |
import ssl | |
import atexit | |
if __name__ == '__main__': | |
# 接続情報 | |
host = 'IP or FQDN' | |
username = 'administrator@vsphere.local' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim | |
import ssl | |
import atexit | |
if __name__ == '__main__': | |
# 接続情報 | |
host = 'IP or FQDN' | |
username = 'administrator@vsphere.local' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim | |
import ssl | |
import atexit | |
if __name__ == '__main__': | |
# 接続情報 | |
host = 'vCenter IP or Host Name' | |
username = 'administrator@vsphere.local' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim, vmodl | |
import ssl | |
import atexit | |
# 接続情報 | |
host = 'vCenter IP or Host Name' | |
username = 'administrator@vsphere.local' | |
password = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from zabbix.api import ZabbixAPI | |
if __name__ == '__main__': | |
""" | |
Zabbixサーバにグループを追加するスクリプト例 | |
追加するグループは `TESTグループ` | |
""" | |
# Zabbixサーバ情報 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from zabbix.api import ZabbixAPI | |
from collections import defaultdict | |
def multi_dimension_dict(dimension, callable_obj=int): | |
""" | |
pythonで多次元連想配列を使う関数 | |
参照元: http://materia.jp/blog/20121119.html | |
""" | |
nodes = defaultdict(callable_obj) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pyVim.connect import SmartConnect, Disconnect | |
from pyVmomi import vim, vmodl | |
import ssl | |
import atexit | |
# 接続先情報 | |
host = 'ESXi or vCenter IP' | |
username = 'username' | |
password = 'password' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import json | |
import os | |
import time | |
import sys | |
from random import randint | |
from collections import defaultdict | |
def multi_dimension_dict(dimension, callable_obj=int): | |
""" |
OlderNewer