[END]VAC BAN
Bye,My dear friend's =(
United Kingdom (Great Britain)
I don't ♥♥♥♥♥♥♥ know why i go banned but...yeah i got.
Bye bye my dear friend's !!!!


This is a little Powershell script that fetch metric's values from Sentinel/Aladdin HASP Network Monitor. Tanx to Tor user for HaspMonitor.exe utility.

Actual release 1.2.0

Note Since release v1.0 NetHASP Miner do not use HaspMonitor.exe to avoid runtime overheads. Wrapper DLL for hsmon.dll will be compiled on first run of the .ps1. By virtue of certain .NET procedures first run will be longer that other. Do not be nervous.

Note Due hsmon.dll compiled to 32-bit systems, you need to provide 32-bit environment to run all code, that use that DLL. To avoid errors while run script on 64-bit systems you must use 32-bit instance of PowerShell. Its may be placed here: %WINDIR%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe.

Support objects:

Server - NetHASP server that can detected with "GET SERVERS" command;
Module - NetHASP Module that can detected with "GET MODULES ..." command;
Slot - NetHASP Slot that can detected with "GET SLOTS ..." command;
Login - NetHASP Login that can detected with "GET LOGINS ..." command.

Actions:

Discovery - Make Zabbix's LLD JSON;
Get - Get metric of object collection's item;
Count - Count collection's items;
DoCommand - Do NetHASP Monitîr command that not required connection to server (HELP, VERSION). Command must be specified with -Key parameter.

Zabbix's LLD available to:

Server ;
Module ;
Slot ;
Login .
At First - check value of variable HSMON_LIB_PATH which placed inside .ps1. Choose - let script search all need files (hsmon.dll, nethasp.ini, wraphsmon.dll) in dir, from where its execute or use fixed path, that you set.

Now running of Miner so simple - just use parameters to specify:

-Action - what need to do with collection or its item;
-Object - rule to make collection;
-Key - "path" to collection item's metric;
-ServerID - to select NetHASP server from list;
-ModuleID - to additional objects selecting by Module Address;
-SlotID - to additional objects selecting by Slot;
-LoginID - to additional objects selecting by login Index;
-ErrorCode - what must be returned if any process error will be reached;
-ConsoleCP - codepage of Windows console. Need to properly convert output to UTF-8;
-DefaultConsoleWidth - to leave default console width and not grow its to CONSOLE_WIDTH (see .ps1 code);
-Verbose - to enable verbose messages.

Examples:

# Get output of NetHASP Monitor VERSION command
powershell -NoProfile -ExecutionPolicy "RemoteSigned" -File "nethasp.ps1" -Action "DoCommand" -Key "VERSION" -defaultConsoleWidth

# Make Zabbix's LLD JSON for NetHASP servers
... "nethasp.ps1" -Action "Discovery" -Object "Server"

# Return number of used licenses on Slot #16 of stuffserver.contoso.com server. If processing error reached - return "-127"
... "nethasp.ps1" -Action "Get" -Object "Slot" -Key "CURR" -ServerId "stuffserver.contoso.com" -SlotId "16" -ErrorCode "-127"

# Show formatted list of 'Module' object(s) metrics. Verbose messages is enabled. Console width is not changed.
... "nethasp.ps1" -Action "Get" -Object "Module" -defaultConsoleWidth -Verbose
I don't ♥♥♥♥♥♥♥ know why i go banned but...yeah i got.
Bye bye my dear friend's !!!!


This is a little Powershell script that fetch metric's values from Sentinel/Aladdin HASP Network Monitor. Tanx to Tor user for HaspMonitor.exe utility.

Actual release 1.2.0

Note Since release v1.0 NetHASP Miner do not use HaspMonitor.exe to avoid runtime overheads. Wrapper DLL for hsmon.dll will be compiled on first run of the .ps1. By virtue of certain .NET procedures first run will be longer that other. Do not be nervous.

Note Due hsmon.dll compiled to 32-bit systems, you need to provide 32-bit environment to run all code, that use that DLL. To avoid errors while run script on 64-bit systems you must use 32-bit instance of PowerShell. Its may be placed here: %WINDIR%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe.

Support objects:

Server - NetHASP server that can detected with "GET SERVERS" command;
Module - NetHASP Module that can detected with "GET MODULES ..." command;
Slot - NetHASP Slot that can detected with "GET SLOTS ..." command;
Login - NetHASP Login that can detected with "GET LOGINS ..." command.

Actions:

Discovery - Make Zabbix's LLD JSON;
Get - Get metric of object collection's item;
Count - Count collection's items;
DoCommand - Do NetHASP Monitîr command that not required connection to server (HELP, VERSION). Command must be specified with -Key parameter.

Zabbix's LLD available to:

Server ;
Module ;
Slot ;
Login .
At First - check value of variable HSMON_LIB_PATH which placed inside .ps1. Choose - let script search all need files (hsmon.dll, nethasp.ini, wraphsmon.dll) in dir, from where its execute or use fixed path, that you set.

Now running of Miner so simple - just use parameters to specify:

-Action - what need to do with collection or its item;
-Object - rule to make collection;
-Key - "path" to collection item's metric;
-ServerID - to select NetHASP server from list;
-ModuleID - to additional objects selecting by Module Address;
-SlotID - to additional objects selecting by Slot;
-LoginID - to additional objects selecting by login Index;
-ErrorCode - what must be returned if any process error will be reached;
-ConsoleCP - codepage of Windows console. Need to properly convert output to UTF-8;
-DefaultConsoleWidth - to leave default console width and not grow its to CONSOLE_WIDTH (see .ps1 code);
-Verbose - to enable verbose messages.

Examples:

# Get output of NetHASP Monitor VERSION command
powershell -NoProfile -ExecutionPolicy "RemoteSigned" -File "nethasp.ps1" -Action "DoCommand" -Key "VERSION" -defaultConsoleWidth

# Make Zabbix's LLD JSON for NetHASP servers
... "nethasp.ps1" -Action "Discovery" -Object "Server"

# Return number of used licenses on Slot #16 of stuffserver.contoso.com server. If processing error reached - return "-127"
... "nethasp.ps1" -Action "Get" -Object "Slot" -Key "CURR" -ServerId "stuffserver.contoso.com" -SlotId "16" -ErrorCode "-127"

# Show formatted list of 'Module' object(s) metrics. Verbose messages is enabled. Console width is not changed.
... "nethasp.ps1" -Action "Get" -Object "Module" -defaultConsoleWidth -Verbose
현재 오프라인
Maksimus 2016년 4월 18일 오후 12시 09분 
+rep good player
Clomneister 2016년 4월 8일 오전 6시 45분 
+rep
Tallen 2016년 2월 27일 오전 12시 51분 
RIP
You we're real good, maybe even the best!
[END]VAC BAN 2015년 6월 23일 오전 3시 35분 
Yes :)
Tallen 2015년 6월 22일 오후 12시 09분 
Needs more salad
[END]VAC BAN 2014년 10월 24일 오전 11시 33분 
:))