Open mdiogene opened 2 months ago
In this case i need the raw agent output from your device. As the failure happens at parsing time, it means the data can be collected from the device.
In this case i need the raw agent output from your device. As the failure happens at parsing time, it means the data can be collected from the device.
Hello, Yes, the data are collected but the parsing is not done correctly.
I had this as the output
<<<3par_node>>>
0 CZ23080CG7-0 OK No Yes Off GreenBlnk 210624 51200 100
1 CZ23080CG7-1 OK Yes Yes Off GreenBlnk 210624 51200 100
I have changed the parsing code by using a simple mapping by attributing each variables extract from ThreeParNode
by using node_id as a key to store each entry from ThreeParNode.
def parse_3par_node(string_table: StringTable) -> Section:
"""parse raw data into dict"""
parsed: dict[str, ThreeParNode] = {}
for line in string_table:
# Assurer que la ligne a bien 10 colonnes
if len(line) == 10 and line[0].isdigit():
(
node_id,
name,
state,
master,
cluster,
service_led,
master_led,
control_mem,
data_mem,
cache,
) = line
parsed[node_id] = ThreeParNode(
node_id=node_id,
name=name,
state=state,
master=master,
cluster=cluster,
service_led=service_led,
master_led=master_led,
control_mem=control_mem,
data_mem=data_mem,
cache=cache,
)
return parsed
There is also a problem with 3par_pd.py script. I have not correct it yet. To gon on for testing the ruleset "[HPE 3par with SSH]" I have disabled 3par_pd in special_agents/agent_threepar_ssh.py but when validating the new monitored services I have an error message du to the fact that your are using number in scripts names.
Started at: 14:48:28. Finished at: 14:48:30.
Error running automation call restart (exit code 5), error:
Error precompiling checks for host par01: File "/omd/sites/cmk/var/check_mk/core/helper_config/112/host_checks/para01", line 40
import cmk_addons.plugins.threepar_ssh.agent_based.3par_node
^
SyntaxError: invalid decimal literal
This error is du to the fact you are using number in script names, you might change it to 3par_node.py -> threepar_node.py
If you need the output for 3par_pd, here it is
<<<3par_pd>>>
----Size(MiB)---- -----Ports-----
Id CagePos Type RPM State Total Free A B Capacity(GB)
0 0:0:0 SSD N/A normal 3660800 1294336 0:11:1* 1:11:1* 3840
1 0:1:0 SSD N/A normal 3660800 1319936 0:12:1* 1:12:1* 3840
2 0:2:0 SSD N/A normal 3660800 1295360 0:13:1* 1:13:1* 3840
3 0:3:0 SSD N/A normal 3660800 1318912 0:14:1* 1:14:1* 3840
4 0:4:0 SSD N/A normal 3660800 1295360 0:15:1* 1:15:1* 3840
5 0:5:0 SSD N/A normal 3660800 1321984 0:16:1* 1:16:1* 3840
6 0:6:0 SSD N/A normal 3660800 1293312 0:17:1* 1:17:1* 3840
7 0:7:0 SSD N/A normal 3660800 1319936 0:18:1* 1:18:1* 3840
8 0:8:0 SSD N/A normal 3660800 1294336 0:19:1* 1:19:1* 3840
9 0:9:0 SSD N/A normal 3660800 1320960 0:20:1* 1:20:1* 3840
10 0:10:0 SSD N/A normal 3660800 1293312 0:21:1* 1:21:1* 3840
11 0:11:0 SSD N/A normal 3660800 1321984 0:22:1* 1:22:1* 3840
12 2:0:0 SSD N/A normal 3660800 1294336 0:0:1* 1:0:1* 3840
13 2:1:0 SSD N/A normal 3660800 1320960 0:0:1* 1:0:1* 3840
14 2:2:0 SSD N/A normal 3660800 1295360 0:0:1* 1:0:1* 3840
15 2:3:0 SSD N/A normal 3660800 1321984 0:0:1* 1:0:1* 3840
16 2:4:0 SSD N/A normal 3660800 1295360 0:0:1* 1:0:1* 3840
17 2:5:0 SSD N/A normal 3660800 1321984 0:0:1* 1:0:1* 3840
18 2:6:0 SSD N/A normal 3660800 1293312 0:0:1* 1:0:1* 3840
19 2:7:0 SSD N/A normal 3660800 1319936 0:0:1* 1:0:1* 3840
20 2:8:0 SSD N/A normal 3660800 1295360 0:0:1* 1:0:1* 3840
21 2:9:0 SSD N/A normal 3660800 1321984 0:0:1* 1:0:1* 3840
22 2:10:0 SSD N/A normal 3660800 1294336 0:0:1* 1:0:1* 3840
23 2:11:0 SSD N/A normal 3660800 1321984 0:0:1* 1:0:1* 3840
-------------------------------------------------------------------------
24 total 87859200 31386624
Best regards,
Hello,
I have tried to use the 3par_ssh package and the check is not collecting data, it endup with this warning:
my system: HPE Alletra 9000
Do you know what is wrong ?
Best regards,