kubed_zero

Community Developer
  • Posts

    168
  • Joined

  • Last visited

Everything posted by kubed_zero

  1. Fantastic, glad things got sorted out. I'm a little surprised all the other logging was missing from the installation, I would have expected the notification that Perl was needed to show up when you were installing. Maybe it is different with Community Apps or something, not sure. Adding additional warning about Perl is a good suggestion, I'll look into adding it. Thanks!
  2. The PLG file executes in order, and since we see that the README is skipped over the next section with relevance is a bash script to check if Perl is installed: https://github.com/kubedzero/unraid-snmp/blob/main/snmp.plg#L119 I'm unclear as to why the error doesn't show up, but do you have NerdPack/Perl installed? root@UNRAID:~# which perl /usr/bin/perl root@UNRAID:~#
  3. Did you include the "exit 1" message in the logs you pasted?
  4. 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.
  5. Was there supposed to be an error in the log you posted?
  6. 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?
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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
  12. 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?
  13. 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.
  14. 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!
  15. 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.
  16. 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.
  17. 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.
  18. Yes sorry! As @jonathanm said I was using reconstruct writes. But as you said the default mode as defined by the wiki https://wiki.unraid.net/Parity#Performance only does parity + destination disk reads and writes. Thanks for the correction! Ah that's what I was thinking of, thanks! I use that mode because I think it grants better performance, but I'm not positive.
  19. I back up a 512GB drive with maybe 300GB used, the initial backup usually takes a couple days to complete the first one. Time machine uses a ton of small files from what I've seen (all those bands folders/files) and I think network protocols like AFP/SMB/NFS don't typically handle it in a performant manner. For unRAID over a wired network mounted on a Windows computer, I often times can only transfer or delete files at a rate of 7-10/second. One disk no cache is my setup too. I'm using a WD 10TB white label for the parity and destination drive with two other 6TB WD Purples in the array for 4 disks total. How is your array set up? I can't remember for sure but I think writing to the array requires reads from all drives in the array, meaning that reads or writes to say Disk 3 could slow down writes to disk 2.
  20. Also working fine for me on 6.8.0, no difference in performance or behavior from 6.7.2 that I was on before. I have a 2.5TB SMB share set to fill-up Disk 1 in my array (so it doesn't split across disks), Export set to Yes/Time Machine and security set to Private (to force a user/password). It's been working without issue for a couple years.
  21. My favorite feature is the ease of replacing drives. I would want to see better information about the files being read or written to the array. IOTOP and NMON don't give enough information, only that SHFS is accessing the disk.
  22. Weird, that doesn't happen for me! I also don't run any VMs or Docker though, so perhaps I'm missing some edge case there. What do plugins' installations have to do with KVM and Docker startup? I'd be happy to push an update to include the images in the .plg file if I can find a way to do that! Or add a delay to the installation before trying to make a network call. Do you have any documentation or sample plugins that have this behavior that I could follow? I'm not sure how it would make a difference though, doesn't the plugin also need to download the SNMP package every time it installs, which also needs the network to be established? I took a quick look through the logs of @rorton and saw the image network failure but didn't see how that failure related to the libvirt.img in use error. Thanks!
  23. 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!
  24. 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
  25. 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.