https://mega.nz/file/qpAUhQDT#OyMMr_oqyBr19rJEiQTvpNR_5WKQv0yHin9nh6ucafk
https://mega.nz/file/zoQGTaRQ#rgG3IKexUH9dVe5YbceCh6Wq9E7-LLLH8sU_uCmiG_Y
This is my python script and bash script sample called python script. The $1 $2 $3 $4 is argument.
This is sample when you need get memory used percent:
"/usr/bin/python /usr/lib/zabbix/externalscripts/HPSwitch.py ip_switch getMem username_webconsole_Switch password_webconsole_Switch"
"/usr/bin/python /usr/lib/zabbix/externalscripts/HPSwitch.py 192.168.1.245 getMem admin 123456"
for getCPU
"/usr/bin/python /usr/lib/zabbix/externalscripts/HPSwitch.py 192.168.1.245 getCPU admin 123456"
You need to setup python on server and install "requests, json, sys" library. I writen this script long time ago. I can't remember exactly. May be the library ready existing in python when you install it.
The last, Your monitor system must be support extenal or internal script like zabbix. And you will create extenal or internal script item.
Please talk me detail your problem. I will support you. (your monitor system, url your hp switch web console)
The url web console must to same url bellow:
url = "http://" + sys.argv[1] (http://192.168.1.245)
urlLogin = "/htdocs/login/login.lua" (http://192.168.1.245/htdocs/login/login.lua - login url web console)
urlData = "/htdocs/pages/base/support.lsp" (http://192.168.1.245/htdocs/pages/base/support.lsp - have cpu and memory info in here)
urlLogout = "/htdocs/pages/main/logout.lsp" (http://192.168.1.245/htdocs/pages/main/logout.lsp - logout url web console)
Sorry for my bad English!