sabuto / hassio-telegraf

MIT License
28 stars 14 forks source link

SNMP MIBS #27

Open sabubot[bot] opened 4 years ago

sabubot[bot] commented 4 years ago

@psolarcz commented on Mar 22 2020, 3:11 PM UTC:

Is there a way to mount host snmp mibs to the container ?

2020-03-22T15:06:00Z E! [inputs.snmp] Error in plugin: initializing table snmp: translating: exit status 2: Created directory: /var/lib/snmp/mib_indexes MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp Cannot find module (IF-MIB): At line 1 in (none) IF-MIB::ifXTable: Unknown Object Identifier

This issue was moved by Sabuto from Sabuto/hassio-repo#7.

sabuto commented 4 years ago

I'm not sure that it is i don't think we can manually mount a folder from within the addon, let me do some digging

psolarcz commented 4 years ago

When I was using telegraf container I had this volume mounted:

niedz., 22 mar 2020 o 16:38 Sabuto notifications@github.com napisał(a):

I'm not sure that it is i don't think we can manually mount a folder from within the addon, let me do some digging

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sabuto/hassio-telegraf/issues/27#issuecomment-602227621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AICPQ65QCPQUIUBJNHYG22LRIYWFRANCNFSM4LRKTC3A .

-- Pozdrawiam Piotr Solarczyk

sabuto commented 4 years ago

yeah unfortunately i think hassio limits the ability to mount custom folders,

jrbenito commented 4 years ago

how about put the MIBS inside hassio config page and mount it inside the container or simply symlink it inside the container?

sabuto commented 4 years ago

@jrbenito that is not a bad shout, if i get time i will do this. Happy to take PR's on this :)

jrbenito commented 4 years ago

well, I want to learn how to work with addons for hassio so I will try to take time and look into this too. Thanks

sabuto commented 4 years ago

@jrbenito unfortunately i cannot symlink something outside the container to the inside, it won't work. Also I cannot mount a folder so unfortunately with this i don't think there are many options to consider unless the devs decide to change how we mount folders

jrbenito commented 4 years ago

@Sabuto Thanks for reaching back.

But do you have access to config folder from the inside the container or not? (I still don't understanding exactly how hassos does this).

sabuto commented 4 years ago

I have access to the config, ssl, addons, backup and share folders within hassio which are on the host fs. So I may do it so it create a new folder within the share folder in hassio and the user manually copies over the files to that and then telegraf can symlink them to the proper place

jrbenito commented 4 years ago

So, my idea is somehow like:

  1. put MIBs in a homeassistant folder, for instance config/MIBs
  2. inside telegraf container, copy or symlink to that directory so telegraf can find it. 2.1 in the case symlinking is impossible, the copy shall occur on every container restart (and new MIBs will be available upon container restart)

I think is the same you described above.

golden-oldie commented 4 years ago

Hi,

I like the plugin but not being able to use MIB's was driving me mad. So updated the image to include standard MIB's such as IF-MIB. That's got me up and running with what I was trying to do but obviously if there's a better way of getting the standard MIB's included as a minimum that would save people a lot of time and frustration with what is a good addition to Home Assistant.

Thanks to @Sabuto for creating this!