I've finally fixed it.? Adam's suggestions pointed me in the right direction.? I'm not sure this should be considered a solution, but I reformatted the drive and specified the block size to be 1024 instead of letting the OS decide.? It showed up on the Xymon Server disk list properly as soon as I did that.
Kris Springer
On 11/29/22 2:54 PM, nor krie wrote:
Oh,
that was a misunderstanding. You should not change the client script that way, but test at shell level what the df -P output is like (especially if the USB output is all in one line). As Michael pointed out, the server routines needs the standard Posix output format. But if you run the standard client script manually, you will see the same output as at server side under "client info available". In the df section there should be the USB disk usage in one line like the other partitions. If it is not there, but visible by df -P at the client, then it is stripped by the $EXCLUDE in the client script.
Norbert
Am Di., 29. Nov. 2022 um 20:41?Uhr schrieb Kris Springer <kspringer at innovateteam.com>:
Running df -P | grep USB manually results in? the following results, with quite a bit of space between the output sections. /dev/sda?????????????????? 960303848? 268800 911180536 1% /media/user/USB-1TB Putting df -P | grep USB into the script results in the Server page showing the 'Expected strings (Capacity and Mounted) not found' error Kris Springer On 11/29/22 10:07, nor krie wrote:Hi Kris, in analysis.cfg you can only set thresholds for disks which are reported by the client and thus are already visible in the disk and inode column of your Xymon server. If there is no USB drive and no graph, then you don't need to mess up with server side config. By default the Xymon client will only provide info about local disks (which makes sense, as the remote mounted disks should be monitored at the source and not at dozens of connected servers), and also only for fixed mounted disks to avoid alerts if a removable media gets disconnected. If you want to change this you have to modify the linux client script (but as pointed out, ensure the output as Posix standard to not confuse the server side evaluation!). So it is no problem to remove the "l" from "df -Pl", but not the "P". You can also remove the "-x $EXCLUDES" w/o problems. Does a "df -P | grep USB" show your USB drive? If yes, modify the client script and test by "./xymonclient-linux.sh | grep USB". This also should show your USB drive. If not, the disk is not properly mounted. Norbert Am Di., 29. Nov. 2022 um 17:11?Uhr schrieb Kris Springer <kspringer at innovateteam.com>: Continued thanks for the responses.? I did try commenting everything out of the analysis.cfg except for the default DISK * line, but still no joy.? I don't think analysis.cfg is causing the USB to be ignored.? The xymonclient-linux script has been set back to it's original state. Kris Springer On 11/29/22 08:28, Adam Thorn wrote: > On 29/11/2022 01:21, Kris Springer wrote: > >> Thanks for pointing me in the direction of the client script.? I >> messed around with it a lot > > I'd advise against editing the xymonclient script unless you're very > careful, because... > >> So then in the script with all the df stuff commented out, I had it run >> df /dev/sda > > ...putting this in the client script will break server-side processing > because... > >> The results of the script show the USB, but nothing shows up on the >> Server Disk page except this error. >> Expected strings (Capacity and Mounted) not found in df output > > ..one of the df arguments specified in the original client script is > "-P" which specifies "use the POSIX output format". Compare the header > row generated by df with and without -P: > > $ df | head -n1 > Filesystem???? 1K-blocks??? Used Available Use% Mounted on > > $ df -P | head -n1 > Filesystem???? 1024-blocks??? Used Available Capacity Mounted on > > xymond is expecting the latter format, so by manually hacking the > client script and changing the arguments, the message sent to the > server is no longer in the format it expects - which is what's leading > to that "Expected strings ... not found" message, I think. > > I'd suggest putting the original client script back in place and > debugging from there. Perhaps a good place to start would be with a > very simple analysis.cfg with just two lines: > > DEFAULT > ? DISK * 90 95 > > and nothing else. If your disk then shows up in the 'disk' report, the > problem is somewhere in your live analysis.cfg. I'm not immediately > sure when analysis.cfg is reread - I can't see any mention in the > documentation, but I may not be looking in the right place. > > Adam > _______________________________________________ > Xymon mailing list > Xymon at xymon.com > http://lists.xymon.com/mailman/listinfo/xymon _______________________________________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon