Adding to Infoblox nios OS

Tags: #<Tag:0x00007f06411b5870>

I’m looking to add DHCP and DNS service checking for NIOS. That is an array within an array, so I’m not entirely sure how to import it…
to nios.yaml, I added:

Blockquote
-
oid: ibServiceStatus.dhcp
num_oid: ‘.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.2.{{ index }}’
index: ‘ibServiceStatus.dhcp.{{ $index }}’
descr: ‘DHCP Status’
states:
- { value: 1, generic: 1, graph: 0, descr: Working }
- { value: 2, generic: 1, graph: 0, descr: Warning }
- { value: 3, generic: 1, graph: 0, descr: Failed }
- { value: 4, generic: 1, graph: 0, descr: Inactive }
- { value: 5, generic: 1, graph: 0, descr: Unknown }

which appears to work when I run the discovery:

Blockquote
Data ibServiceStatus.dhcp:
array (
‘dhcp’ =>
array (
‘ibServiceStatus’ => ‘1’,
),
)
Final sensor value:
array (
‘ibGridStatus’ =>
array (
‘ibGridStatus.0’ => 1,
),
‘ibHaStatus’ =>
array (
‘ibHaStatus.0’ => 1,
),
)

However, nothing shows in the State table in the device GUI and I’m not sure how to use it.

Looking at the discovery, it now looks right, but I do not see it in the GUI and events does not show “sensor added”

Blockquote
oid: ibServiceStatus.dhcp
num_oid: ‘.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.1’
index: ‘ibServiceStatus.dhcp’
descr: ‘DHCP Status’
states:
- { value: 1, generic: 0, graph: 0, descr: Working }
- { value: 2, generic: 1, graph: 0, descr: Warning }
- { value: 3, generic: 2, graph: 0, descr: Failed }
- { value: 4, generic: 2, graph: 0, descr: Inactive }
- { value: 5, generic: 3, graph: 0, descr: Unknown }

Blockquote
array (
‘oid’ => ‘ibServiceStatus.dhcp’,
‘num_oid’ => ‘.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.1’,
‘index’ => ‘ibServiceStatus.dhcp’,
‘descr’ => ‘DHCP Status’,
‘states’ =>
array (
0 =>
array (
‘value’ => 1,
‘generic’ => 0,
‘graph’ => 0,
‘descr’ => ‘Working’,
),
1 =>
array (
‘value’ => 2,
‘generic’ => 1,
‘graph’ => 0,
‘descr’ => ‘Warning’,
),
2 =>
array (
‘value’ => 3,
‘generic’ => 2,
‘graph’ => 0,
‘descr’ => ‘Failed’,
),
3 =>
array (
‘value’ => 4,
‘generic’ => 2,
‘graph’ => 0,
‘descr’ => ‘Inactive’,
),
4 =>
array (
‘value’ => 5,
‘generic’ => 3,
‘graph’ => 0,
‘descr’ => ‘Unknown’,
),
),
),
),
)

Solved…

Blockquote
-
oid: ibServiceStatus
num_oid: ‘.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.1’
index: ‘ibServiceName.1’
descr: ‘DHCP Status’
states:
- { value: 1, generic: 0, graph: 0, descr: Working }
- { value: 2, generic: 1, graph: 0, descr: Warning }
- { value: 3, generic: 2, graph: 0, descr: Failed }
- { value: 4, generic: 2, graph: 0, descr: Inactive }
- { value: 5, generic: 3, graph: 0, descr: Unknown }

I’ll add one for DNS and submit it through git…