check_json.php

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
btayl
Posts: 123
Joined: Mon Aug 24, 2020 8:51 am

check_json.php

Post by btayl »

I use check_json.php but can not get the for correct for this one
Here is a copy of what my api returns bellow. how would it get the MacAddress: "c4:42:68:1c:fd:f5 on the last part
{
Device: {
Programs: {
IpTableByPID: [
{
UniqueId: 5
ProgramInstanceId: "B777R416"
ProgramIpId: 1024
Model: "CEN-IO-COM-102"
Description: "CEN-IO-COM-102"
remote_ip: ""
Status: "ONLINE"
device_type: 3
MacAddress: "00:10:7f:91:c0:2b"
DeviceId: 1024
Hostname: "AVCS-777-RS232"
SupportAssociation: false
}
{
UniqueId: 6
ProgramInstanceId: "B777R416"
ProgramIpId: 18
Model: "TSW-570"
Description: "TSW-570"
remote_ip: ""
Status: "ONLINE"
device_type: 1
MacAddress: "c4:42:68:1c:fd:f5"
DeviceId: 18
Hostname: "TS-1070-C442681CFDF5"
SupportAssociation: false
}
]
}
}
}
btayl
Posts: 123
Joined: Mon Aug 24, 2020 8:51 am

Re: check_json.php

Post by btayl »

Figured it out -k 'Device.Programs.IpTableByPID[1].MacAddress' -s 'c4:42:68:1c:fd:f5'
Post Reply