Adding to Infoblox nios OS

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…

OK - only partially solved. I would like to submit this back for inclusion, but I need to make it dynamic and whatever I try, the polling fails, despite the initial discovery looking good.

I have this, currently:

Blockquote oid: ibMemberServiceStatusEntry
value: ibServiceStatus
num_oid: ‘.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.{{ $index }}’
index: ‘ibServiceStatus.{{ $index }}’
descr: ‘{{ $ibServiceDesc }}’
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 }

and, on checking polling, the snmpwalk returns:

Blockquote.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.dhcp: Unknown Object Identifier (dhcp)
.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.dns: Unknown Object Identifier (dns)
.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.ntp: Unknown Object Identifier (ntp)
.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.tftp: Unknown Object Identifier (tftp)
.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.http-file-dist: Unknown Object Identifier (http-file-dist)
.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.ftp: Unknown Object Identifier (ftp)
.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.bloxtools-move: Unknown Object Identifier (bloxtools-move)
.1.3.6.1.4.1.7779.3.1.1.2.1.9.1.2.bloxtools: Unknown Object Identifier (bloxtools)

Replied in the PR :

`num_oid`  (required): This is the numerical OID that contains  `value` . 
This should always include  `{{ $index }}` . snmptranslate -On can help 
figure out the number. In case the index is a string,  `{{ $index_string }}`  can be used instead.

I know what the OIDs are - that is not the problem. ibMemberServiceStatusEntry has 3 OIDs beneath it - ibServiceName, ibServiceStatus and ibServiceDesc. I know what the numeric OIDs for each of these are, but whichever I try to use, the initial discovery brings them up correctly, but the initial poll sets them all to zero. In addition, the initial discovery sets the other two states (ibGridStatus and ibHaStatus) to zero.

I spent way too long trying to make this work. I’ll just use my own nios.yaml with the 3 static entries I need.

Thanks to @PipoCanaja this now fully works.