Help with MIB-file with new os

Hi all.

Where I work, we just got a new generator.
It supports SNMP. I was thinking I could monitor some of it with LibreNMS.

The controller for the generator is from the company ComAp (https://www.comap-control.com/).

So I tried to run the new-os script ./scripts/new-os.php
It all went fine until it came to pointing to the MIB-file (pastebin to MIB-file text Untitled - LibreNMS). Then I got the following error messages.

Cannot find module (COMAP-InteliLite4-29): At line 12 in (none)
Unable to find a matching object identifier for “.*Table$”

So this is all new to me, and I do not understand MIB-files in any way.
Just looking for pointers. What can I do? Can anyone help? What are my options?

Thankful for any feedback that would help me to move forward towards a solution.

Can you post the output from new-os.php so we can see what options you used and what it’s doing?

Hi.

I ran the script again. Same output. Hope it was this you were after.
It looked like this::

librenms@librelabb:~$ ./scripts/new-os.php -h 34 -o ComAp -t Power -v ComAp

The OS ComAp appears to exist already, skipping to sensors support

ctrl+c to exit now otherwise please enter the MIB name including path (url is also fine) for us to check for sensors: COMAP-InteliLite4-29

MIB search path: /opt/librenms/mibs:/opt/librenms/mibs/ComAp

Cannot find module (COMAP-InteliLite4-29): At line 12 in (none)

Unable to find a matching object identifier for “.*Table$”

/opt/librenms/includes/definitions/discovery/ComAp.yaml already exists, here’s the data we would have added:librenms@librelabb:~$

So COMAP-InteliLite4-29 needs to be in /opt/librenms/mibs:/opt/librenms/mibs/ComAp. Place it in their with the name COMAP-InteliLite4-29 and try again.

The file is there

librenms@librelabb:~/mibs/Comap$ ls
COMAP-InteliLite4-29

However, by just trail and error I found out this:

When running

./scripts/new-os.php -h 34 -o ComAp -t Power -v ComAp
OR
./scripts/new-os.php -h 34 -o ComAp -t Power -v COMAP

I get the same error as mentioned above…

But when I run it like this

./scripts/new-os.php -h 34 -o Comap -t Power -v Comap

I get a whole other reslut (with lots of errors of some sort) please see
https://p.libren.ms/view/e3b1635f

What MIB’s are you trying to bring in. I might already have the python script to make it easier. If not I can write one up rather quick. What hardware are you adding?

Hi Chain.

Not sure if I know how to answer.
When looking in the MIB-file, it would be nice to be able to look at

vGeneratorVoltageL1N
vGeneratorVoltageL2N
vGeneratorVoltageL3N
vMainsVoltageL1N
vMainsVoltageL2N
vMainsVoltageL3N
vLoadCurrentL1
vLoadCurrentL2
vLoadCurrentL3
vBatteryVolts
vTotalFuelConsumption
vFuelLevel
vEngineState
vCUTemperature

Does that anser your question? (sorry if I missunderstand, I’m a total rookie with MIB’s ).

The hardware is the controller to a generator. The controller is from the company https://www.comap-control.com/, controller name is InteliLite 4 AMF 9.

Hi.

I have tried some things on my own.

I created my own definitions and discovery yamls.
I tried to include Sensors Voltage for the incomming power.
When I do a snmp walk on the specific OID it returns result
ex.
librenms@librelabb:~$ snmpwalk -v2c -c ********** 192.168.11.221 .1.3.6.1.4.1.28634.29.2.8195
iso.3.6.1.4.1.28634.29.2.8195.0 = INTEGER: 232

Definitions yaml:

librenms@librelabb:~/includes/definitions$ cat Comap.yaml
os: Comap
text: ‘Comap’
type: power
icon: apple
over:
- { graph: device_current, text: Current }

discovery:
- sysObjectID:
- .1.3.6.1.4.1.28634.29

Discovery yaml:

librenms@librelabb:~/includes/definitions/discovery$ cat Comap.yaml
mib: COMAP-InteliLite4-29
modules:
os:
sysDescr_regex:
- ‘/270898/’
sensors:
voltage:
data:
-
oid: vMainsVoltageL1N
num_oid: ‘.1.3.6.1.4.1.28634.29.2.8195.{{ $index }}’
index: ‘vMainsVoltageL1N.{{ $index }}’
descr: ‘VoltinFas1’
divisor: 10
-

However, it still seems that (in my amateur opionion) that there is something wrong with the MIB-file itselfe.

The output from
./discovery.php -d -h 192.168.11.221

can be found here. Untitled - LibreNMS

Ending this post with a big thanks for the help I have got so far. I know that I don’t understand, but I gues I have to start someware.

Thankfull for more input on this.

Hi all…

After a lot of trail and errors I have solved my issues for now.

The errors I got from the discovery mentioned above was due to issues in the MIB file.

I took the MIB file to some kind of “MIB-file Validator” site online (The Simpleweb - MIB module validation).
It found two faults in the file.
I had no idea how to fix those parts, so i removed them from the MIB-file.

After this everything is working alot better.
Now I’m learning how to add sensors and stuff on my own. But that might be a story for another time…

Thank you to everyone that helped/try to help.

Feel free to open a draft Pull Request if you want help on your discovery YAML file.

Hi.

I would love to make a pull request. But I have no idea how github works.
Is there a guide that I can follow on what I need to know/do.

I also have some yaml-files from vendor CTS that I can upload, I can see that other CTS hardware now is supported.

You can start with this URL which should answer most of your questions:

And come back here for questions if necessary.

And if it does not answer everything or if you feel something should be added, this page can be edited as well, so feel free to do it :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.