Everything posted by kubed_zero
-
[Plug-In] SNMP
Yes. https://github.com/kubedzero/unraid-snmp/blob/main/snmp.plg#L102 the file is defined in the plugin and is skipped over if the file already exists (aka if the plugin is being upgraded or has been installed in the past) Here is my output from the syslog: Jun 6 14:09:10 UNRAID emhttpd: cmd: /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin install /boot/snmp.plg Jun 6 14:09:10 UNRAID root: plugin: skipping: /usr/local/emhttp/plugins/snmp/README.md already exists Jun 6 14:09:10 UNRAID root: plugin: running: anonymous Jun 6 14:09:10 UNRAID root: plugin: skipping: /boot/config/plugins/snmp/libnl-1.1.4-x86_64-1.txz already exists Jun 6 14:09:10 UNRAID root: plugin: running: /boot/config/plugins/snmp/libnl-1.1.4-x86_64-1.txz Jun 6 14:09:10 UNRAID root: plugin: skipping: /boot/config/plugins/snmp/net-snmp-5.8-x86_64-5.txz already exists Jun 6 14:09:10 UNRAID root: plugin: running: /boot/config/plugins/snmp/net-snmp-5.8-x86_64-5.txz Jun 6 14:09:10 UNRAID root: plugin: skipping: /boot/config/plugins/snmp/snmp.png already exists Jun 6 14:09:10 UNRAID root: plugin: skipping: /boot/config/plugins/snmp/drive_temps.sh already exists Jun 6 14:09:10 UNRAID root: plugin: skipping: /boot/config/plugins/snmp/share_free_space.sh already exists Jun 6 14:09:10 UNRAID root: plugin: running: anonymous Jun 6 14:09:10 UNRAID root: plugin: skipping: /usr/local/emhttp/plugins/snmp/snmpd.conf already exists Jun 6 14:09:10 UNRAID root: plugin: running: anonymous Jun 6 14:09:11 UNRAID root: plugin: running: anonymous and here is output from the popup on the plugin page when I install /boot/snmp.plg (not using Github because it won't let you install the same version, so I had to edit the PLG to bump the version) plugin: installing: /boot/snmp.plg +============================================================================== | Skipping package libnl-1.1.4-x86_64-1 (already installed) +============================================================================== +============================================================================== | Skipping package net-snmp-5.8-x86_64-5 (already installed) +============================================================================== +============================================================================== | Copy files from /boot/config/plugins/snmp | into /usr/local/emhttp/plugins/snmp and set permissions +============================================================================== Copy complete! +============================================================================== | Updating /etc/rc.d/rc.snmpd to use our config file, and to reduce logging +============================================================================== Shutting down snmpd: . DONE Starting snmpd: /usr/sbin/snmpd -LF w /var/log/snmpd.log -LF w /var/log/snmpd.log -A -p /var/run/snmpd -a -c /usr/local/emhttp/plugins/snmp/snmpd.conf +============================================================================== | Testing SNMP by listing mounts, /boot should be present +============================================================================== Looks like snmpd is working... Output: HOST-RESOURCES-MIB::hrFSMountPoint.1 = STRING: "/mnt/disk1" HOST-RESOURCES-MIB::hrFSMountPoint.2 = STRING: "/mnt/disk2" HOST-RESOURCES-MIB::hrFSMountPoint.3 = STRING: "/mnt/disk3" HOST-RESOURCES-MIB::hrFSMountPoint.32 = STRING: "/dev/shm" HOST-RESOURCES-MIB::hrFSMountPoint.33 = STRING: "/var/log" HOST-RESOURCES-MIB::hrFSMountPoint.34 = STRING: "/boot" <omitted SNMP output> ----------------------------------------------------------- snmp has been installed. Version: 2020.04.01b ----------------------------------------------------------- plugin: installed DONE so I don't think that's a particular issue, and rather only shows that you've had SNMP installed in the past.
-
[Plug-In] SNMP
Was there supposed to be an error in the log you posted?
-
[Plug-In] SNMP
Does installing any other plugin work? https://www.reddit.com/r/unRAID/comments/c6kefi/rclone_on_unraid/ and https://forums.unraid.net/topic/72238-unraid-updates-failing/ both mention the same issue and the cause being issues with RAM, issues with the USB, or general, non-SNMP-specific problems. Can you paste the logs from when you're trying to install after making sure you have sufficient RAM free, sufficient USB space free, and have rebooted the server?
-
[Plug-In] SNMP
Did you try restarting the server? Did you try reinstalling the plugin? What version of the plugin are you using? What version of Unraid are you using? The curl command on localhost would have no impact on the functionality of SNMP, as I believe SNMP uses some port other than port 80 to communicate. As you can see, the curl command redirects you to the Dashboard and is using Nginx which is more relevant to the Unraid GUI than to SNMP.
-
[Plug-In] SNMP
That is in theory possible. Unraid has the following to commands available. The first lists out the overall speed and the second lists speed of each core I guess. The second would be more difficult to parse and add as output since there would need to be a per-core to speed mapping (2x the OIDs as there are cores) but both are theoretically possible. myuser@mysys:~# lscpu | grep "CPU MHz" CPU MHz: 2400.000 myuser@mysys:~# cat /proc/cpuinfo | grep "cpu MHz" cpu MHz : 2400.000 cpu MHz : 2400.000 cpu MHz : 2400.000 cpu MHz : 2400.000 That said, I am not sure how well this translates to other generations of CPU or different manufacturers. I'm running an Intel CPU under ESXi and Unraid is in a VM at the moment. I have no idea how general the script would need to be to work for everyone installing this. If you check out my previous comment you can see how to easily make a shell script and integrate it into your SNMP config to get the values printed out for yourself.
-
[Plug-In] SNMP
Does it register/overwrite the SNMP configuration when it's installed? Otherwise I don't think it will have OIDs show up. If you wanted it to show up you'd have to make a shell script that outputs the values you want and then add it to the snmp.conf in the same way as disktemp and sharefree are added: https://github.com/kubedzero/unraid-snmp/blob/main/snmp.plg#L225 That config file would be in /usr/local/emhttp/plugins/snmp/snmp.conf. I think you'd then have to kill and restart SNMP to get the changes to show up. If you wanted this to persist between reboots you'd have to modify the Go file or modify a local copy of the SNMP PLG file to have the changes you want.
-
[Plug-In] SNMP
You'll have better luck actually reading the snmpwalk man page https://helpmanual.io/help/snmpwalk/, but from your Unraid console running snmpwalk -v 2c localhost -c public will print out all MIBs and their current values. For my system that's 4046 values. Then you can use the link/command I sent earlier to output a specific MIB that you want to see.
-
[Plug-In] SNMP
I see, I don't think the MIBs are listed anywhere but an snmpwalk command should list everything out for you. The original author of this plugin also added a couple extended MIBs for getting the disk temperatures and free Unraid Share space. Here's the example of the MIB for the extensions https://github.com/kubedzero/unraid-snmp/blob/main/snmp.plg#L269 https://github.com/kubedzero/unraid-snmp/blob/main/snmp.plg#L274
-
[Plug-In] SNMP
There are no settings to adjust in the GUI, you could check on the PLG file to see how it's configured and how the config file is generated and then make edits yourself. What do you want to find the settings for?
-
Plugin system documentation
I'll have to look into that. Thanks for the advice! The .txz file would then be cached on the USB and unzipped into /usr/local/emhttp/plugins? Do you have any recommended repos that install in this fashion? I would still be interested in an answer to my original question if anyone can provide: What documentation is out there for the allowed XML tags in a .plg file that would tell us input and output, allowed tags, etc.
-
[Plug-In] SNMP
All installed plugins reinstall automatically every boot, since /usr/local/emhttp does not persist between reboots since it lives in RAM. I've made an optimization that downloads this plugin's files first to the persistent USB storage and then copies the files into the working directory in RAM. That means once this update is applied, until the files' MD5 sums change the reinstall on each reboot will use the already-downloaded copy. The code change has been pushed https://github.com/kubedzero/unraid-snmp/commit/6d4d8a77e4c44e827b19f9814fab5b7debfa90b9 and should be available for users to update. Let me know if you have questions or suggestions!
-
Plugin system documentation
Is there any documentation about the latest plugin syntax? I'm trying to find a way to cache non-packages for offline installation of the plugin. The linked guide mentions being able to use <FILE Name="/usr/local/emhttp/plugins/&name;/ntfs-3g.png"> <LOCAL>/boot/config/plugins/&name;/ntfs-3g.png</LOCAL> </FILE> to be able to store a copy of the defined file on the USB. However, it can't integrate with a FILE tag that also has a URL. I want to do the opposite, to mirror the behavior of installing packages. That is, download the remote file to the USB (under /boot/config/plugins) and then copy the file into the working directory under /usr/local/emhttp/plugins. Then on a reboot/reinstall of the plugin it can utilize the already-downloaded version instead of making a network request. However, this copy operation does not seem to function in reverse. The following snippet successfully downloads the file from Github onto the USB but does not copy the file from the USB into the emhttp working directory <FILE Name="/boot/config/plugins/icon.png"> <URL>www.blahblahgithub.com/icon.png</URL> <MD5>&iconfilemd5;</MD5> </FILE> <FILE Name="/boot/config/plugins/icon.png"> <LOCAL>/usr/local/emhttp/plugins/snmp/icon.png</LOCAL> </FILE> Without using a custom-written inline bash file, is there any built in syntax to accomplish this? Is there any documentation on what tags are available to us and how they work? I assume the plugin manager isn't open source but if anyone knows of a repo I can peruse to glean more info, I can do that as well.
-
Dynamix File Integrity plugin
I have been using this plugin without issues for years. In the past few months (possibly after the 6.8 update, I can't remember for sure) my scheduled job no longer runs. I've confirmed that it is still present in the Crontab file and that the Cron line is set to the frequency I expect, and running the command manually appears to work fine. I can also trigger integrity checks without issue through the Web UI. All that said, regardless of if I change the job to daily, weekly, monthly, it doesn't seem to make a difference. Curious if anyone else is running across this issue with scheduled integrity checks. Nevermind, I found the answer a couple pages back: Namely the plugin tries to write a Cron line that calls the shell script directly, but 6.8 disallows that and requires calling bash or perl or whatever shebang line you want before running the actual file. That means 10 0 * * * /boot/config/plugins/dynamix.file.integrity/integrity-check.sh &> /dev/null needs to change to 10 0 * * * /bin/bash /boot/config/plugins/dynamix.file.integrity/integrity-check.sh &> /dev/null or in place of /bin/bash it could be /usr/bin/bash or just bash (relying on the environment path to determine which bash to actually run) or sh instead of bash. I was on the 3/08/2020 plugin version and see there was a 3/31 plugin just released, so I'm going to try that again and post back if it works now. Another update, I just updated the plugin to 3/31 and changed the integrity check from weekly to daily to weekly again so it can regenerate the cron file in the /boot/config/plugins/dynamix.file.integrity/ directory and the file now has what I had said earlier, "bash" before the actual shell script. Not sure if a reboot will be needed to apply this new cron file to the actual crontab (can't remember where that lives) but I'm assuming it won't need a reboot to adjust a setting.
-
[Plug-In] SNMP
You shouldn't have to, no. However, it does need the internet at boot time (it redownloads the PLG file and the SNMP library file and icons) every time it installs. That means that it will fail to install if the network isn't online or is still initializing when unRAID boots up. That said, once it does boot up you can reinstall the plugin by pointing to the copy already on the flash drive, either /boot/config/plugins/snmp.plg or /boot/config/plugins-error/snmp.plg to get it installed. I'm hoping to get some time soon to look into other plugin maintainers to see how they manage to reduce network calls during installation. Hopefully in a future version of SNMP it won't have to connect to the network at install time unless it's a first time install, meaning boot time install can just use files cached on the USB drive.
-
[Plug-In] SNMP
I don't know what "check_snmp" is but if you use "snmpwalk" remotely it works fine. Sorry, can't help you here beyond saying: - the same command I posted earlier with localhost subbed out for the IP address and executed from a Mac on the network runs fine - you might want to consider using the same SNMP implementation, aka "snmpwalk." Otherwise, you should go hunt through the documentation for the SNMP tool you're using to figure out how to pass in the arguments correctly. - It could also be that whatever host OS you're using is interpreting quote characters differently good luck!
-
[Plug-In] SNMP
Wrap your identifier in a set of single quotes so the double quotes don't get interpreted by the CLI: root@myUnraid:~# snmpwalk -v 2c -c public localhost 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree"' NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1 = STRING: CoolShare1: 446446297088 NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".2 = STRING: RandomShare: 446446297088 NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".3 = STRING: SharedShare: 392926117888
-
[Plug-In] SNMP
The log says /boot can't be found. It's failing on https://github.com/kubedzero/unraid-snmp/blob/main/snmp.plg#L229 When I try to run the command "snmpwalk -v 1 localhost -c public hrFSMountPoint" on my host I get root@myUnraid:~# snmpwalk -v 1 localhost -c public hrFSMountPoint HOST-RESOURCES-MIB::hrFSMountPoint.1 = STRING: "/mnt/disk1" HOST-RESOURCES-MIB::hrFSMountPoint.2 = STRING: "/mnt/disk2" HOST-RESOURCES-MIB::hrFSMountPoint.3 = STRING: "/mnt/disk3" HOST-RESOURCES-MIB::hrFSMountPoint.24 = STRING: "/dev/shm" HOST-RESOURCES-MIB::hrFSMountPoint.25 = STRING: "/var/log" HOST-RESOURCES-MIB::hrFSMountPoint.26 = STRING: "/boot" It's also possible to run this replacing "localhost" with your host's IP address, like "192.168.0.2" or something. If you can try to run the SNMP command manually and show us what you see, that could be helpful. Perhaps it's just not running and you need to reboot/reinstall. Or perhaps /boot truly is missing, but I can't see how that would be possible.
-
[Plug-In] SNMP
Wild. A quick Google for "realtek invalid ocp" gave me https://lists.openwall.net/netdev/2012/07/09/143 which makes me think it's something to do with the Realtek software stack, although I can't pinpoint exactly what's up. I wonder if it's the SNMP Slackware package trying to query/bind the different network interfaces in the system, and since the Realtek interface isn't disabled in the BIOS it finds that as well. This is just speculation though. I'd suggest BIOS-disabling the unused Realtek NIC that's causing you issues, but would be interested in hearing anything else you find. Assuming the motherboards or network cards are different, maybe the working Realtek NIC is a different model than the one that's causing issues. Maybe the single Realtek NIC doesn't have problems because it's actively bound to an IP and is in use.
-
[Plug-In] SNMP
Ha! Sorry. I run unRAID within a VM under ESXi. Thus, I only use it for its NAS functionality with only a couple plugins: Nerd Tools, Open Files, SNMP, and a couple Dynamix ones. No need for CA with a setup as simple as this! Not to mention this is all on a 1GB USB key with very little free space
-
[Plug-In] SNMP
Just created a new repo for this: https://github.com/kubedzero/unraid-community-apps-xml I don't use CA myself but I can spin up a test instance of unRAID later to confirm this works. That is assuming there's a way to reference this new XML file manually.
-
[Plug-In] SNMP
Created a pull request for the Coppit package on GitHub https://github.com/coppit/unraid-snmp/pull/6 but it doesn't seem like they've been active since August 2018 on here or on GitHub. With that in mind, I've made a version compatible with unRAID 6.7.0 in a forked repository that I'll keep updated for myself and anyone else that wants to use it: https://raw.githubusercontent.com/kubedzero/unraid-snmp/main/snmp.plg
-
unRAID 6 NerdPack - CLI tools (iftop, iotop, screen, kbd, etc.)
I'll check it out. Until then you need to install the version from Slackware 14.2 not Slackware Current. Many packages from Current rely on ncurses 6. UnRAID comes with 5.9. You could also upgradepkg ncurses 6. I believe it's backwards compatible. In the meantime, I'll check this out! Thanks! Update. Got it working, after a little bit of struggle. UnRAID doesn't have compile tools so this guide didn't really help: http://www.gilandre.net/cgi-bin/wiki.cgi/NMONUnderSlackware. I then downloaded a binary and copied it to /boot/extra (from what I hear it gets installed automatically from there at boot): https://slackware.pkgs.org/14.2/slackers/nmon-16f-x86_64-3cf.txz.html However, upon running it I got the "nmon: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory" message. Okay, time to upgrade ncurses. I originally installed some random ncurses-6.0 but it didn't include/install libncurses so I went back and installed ncurses from here: http://packages.slackware.com/?r=slackware-current&p=ncurses-6.0-i586-2.txz by copying it to my boot/extra folder and then running upgradepkg on it. Still the same error though since it didn't install as libncurses.so.6, only libncurses.so. Then I symlinked /usr/lib64/libncurses.so.6 to /usr/lib64/libncurses.so and /usr/lib64/libtinfo.so.6 and it worked!
-
unRAID 6 NerdPack - CLI tools (iftop, iotop, screen, kbd, etc.)
Is there any chance nmon could be included? I tried installing it myself but ran into issues: nmon: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory
-
The 5X3 Cage review - Norco, SuperMicro, iStarUSA and Icy Dock
Regarding the SM unit, I've never seen anything stating whether it supports SATA III. Has anyone tried using SSDs in one of these cages to see if it hinders the read performance compared to a direct connection or a SATA III advertised cage like the Icy Dock FatCage? Thanks!