#Hey So my Harvest lab instance isn t
1 messages · Page 1 of 1 (latest)
hey @wintry tangle - 9.11 should be fine, we test with 9.11 too
can you share the poller's log file?
Location?
depends on how you installed, try /var/log/harvest
ah ok - then https://nabox.org/documentation/troubleshooting/
from that page, this should be sufficient dc logs nabox-harvest2 > nabox-harvest2.log
pstejska-harvest:/# dc logs
dc: can't open 'logs': No such file or directory
pstejska-harvest:/#
:\
Yep
figured or dc wouldn't be found
pstejska-harvest:/# dc ps
dc: can't open 'ps': No such file or directory
pstejska-harvest:/#
are you using a recent version of nabox? I don't use it, sounds like @split cradle will need to chime in after all. Most customers I've helped with nabox, the dc commands on the troubleshooting page work fine, so maybe you're on an older version?
do you have this directory? /usr/local/nabox/docker-compose/
I'm pretty up to date. This is weird. :\
indeed - what if you try docker-compose ps
docker logs works. I'm not getting it to go into a text file though.
progress!! try something like docker-compose logs nabox-harvest2 2>&1 | tee nabox-harvest2.log
pstejska-harvest:/# docker-compose logs nabox-harvest2 2>&1 | tee nabox-harvest2.log
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
pstejska-harvest:/# ls
bin dev lib mnt opt run swap usr
boot etc lost+found nabox-api.log proc sbin sys var
data home media nabox-harvest2.log root srv tmp
pstejska-harvest:/# cat nabox-harvest2.log
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
pstejska-harvest:/#
cd /usr/local/nabox/docker-compose and try again
or you could grab everything with docker-compose logs 2>&1 | tee nabox-harvest2.log
thanks Paul - looks like metrics are definitely being gathered
2:51PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=74ms calcD=0s collector=ZapiPerf:WorkloadVolume instances=23 metrics=575 parseD=7ms 2:51PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=375ms calcD=1ms collector=ZapiPerf:WorkloadDetail instances=45 metrics=90 parseD=12ms 2:51PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=258ms calcD=0s collector=ZapiPerf:Workload instances=5 metrics=130 parseD=3ms 2:51PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=475ms calcD=0s collector=ZapiPerf:WorkloadDetailVolume instances=207 metrics=414 parseD=45ms 2:54PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=75ms calcD=0s collector=ZapiPerf:WorkloadVolume instances=23 metrics=575 parseD=13ms 2:54PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=226ms calcD=0s collector=ZapiPerf:WorkloadDetail instances=45 metrics=90 parseD=16ms 2:54PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=121ms calcD=0s collector=ZapiPerf:Workload instances=5 metrics=130 parseD=2ms 2:54PM INF zapiperf/zapiperf.go:663 > Collected Poller=pstejska_vsim apiD=312ms calcD=0s collector=ZapiPerf:WorkloadDetailVolume instances=207 metrics=414 parseD=32ms
let's check Prometheus
Ok. 10.216.33.135/prometheus if you want
seems to be?
i don't see that volume in Prometheus 🙂
Weird. But it has throughput/iops/latency at the top.
pstejska_vsim::> q workload show
(qos workload show)
Workload Wid Policy Group Vserver Volume LUN Qtree File Path
cifs1-wid21774 21774 medium svm0 cifs1 - - -
qtree1-wid34679
34679 name svm0 fg1 - qtree1 -
test2-wid34121 34121 value-fixed svm0 test2 - - -
Oh because it has a qos policy assigned to it.
pstejska_vsim::> q workload show -instance -workload test2-wid34121
(qos workload show)
Workload Name: test2-wid34121
Workload Class: user-defined
Workload ID: 34121
Workload Category: -
Policy Group Name: value-fixed
Read-ahead Tunables: Default
Vserver: svm0
Volume: test2
Qtree Name: -
LUN Name: -
File Path: -
Maximum Throughput: 15000IOPS,468.8MB/s
Minimum Throughput: -
Adaptive: false
Is Constituent Volume: false
ONTAP won't send metrics for that volume if they're all zeroes - is is possible nothing is happening with it and zero-suppression is kicking in?
No it's active.
hmm
pstejska_vsim::> q s v p s -vserver svm0 -volume test2
(qos statistics volume performance show)
Workload ID IOPS Throughput Latency
-total- - 431 26.88MB/s 235.00us
test2-wid34121 34121 431 26.88MB/s 235.00us
I think I found a bug!
Apparently if you assign an AQoS policy to it then it stops working.
I wonder if it's ONTAP doing that?
ah i know what it is
Login as root. Not admin. For the dc thing not working.
this is a bug we fixed recently
This is what I get for not having my coffee yet.
🙂 I think it's this https://github.com/NetApp/harvest/issues/1264
Try updating Harvest and see if it works?
previously we were only collecting autovolume - when you assigned a policy it became user-defined, which we now collect
yes nightly has this fixed and was published this morning
Yeah that makes sense.
Hmm, still not showing up after downloading the nightly.
That works however.
it will take at least 6 minutes after poller restart since these counters are collected every 3m
Oh ok
Still nothing.
It onyl shows up in qos detail resource latency, but not qos detail volume resource latnecy.
checking
for those eagerly following along at home 🙂 once Paul upgraded to nightly, volumes with an adaptive QOS policy are collected and appear in Grafana
Hello @undone peak I successfully run Harvest 22.08.0 by harvest-22.08.0-1_linux_amd64.tar.gz in RHEL server. I manually created /var/log/harvest directory and the user (non-root) running harvest has read-write permission, I expect to get harvest log there. I found nothing in this directory when harvest is running. After a period of time, I discovered that harvest log writes to /var/log/messages instead of /var/log/harvest by default, it seems it is different from that mentioned in harvest installation. May I know if I am doing something wrong and how I can set harvest log to write to /var/log/harvest directory? Thank you.
hi @humble river I'll double check and it's true that logging depends on the platform and install method. The RPM we create for RHEL is setup to log to /var/log/harvest but let me check where the native install will pick by default
by chance are you setting the HARVEST_LOGS environment variable? Probably not, but otherwise this code should default to /var/log/harvest https://github.com/NetApp/harvest/blob/bddc67ca4c8a841cc44ccafd6008bca97a695cb4/pkg/conf/conf.go#L173
what version of RHEL?
@undone peak Thanks for your reply. I didn't set HARVEST_LOGS environment variable in my case. It is RHEL 8.4.
looking on a RHEL 8.6 system I found
here's what I did: download same build on RHEL 8.6 machine. 2) create group and user named harvest 3) untarred and chowned harvest-22.08.0-1_linux_amd64 3) cd into harvest-22.08.0-1_linux_amd64 4) su harvest 5) bin/harvest start unix 6) check /var/log the harvest directory does not exist because the harvest user does not have permission to create. 7) stop harvest 8) mkdir /var/log/harvest 9) chown -R harvest.harvest /var/log/harvest/ 10) start harvest again as the harvest user. 11) ll /var/log/harvest/ -> -rw-r--r-- 1 harvest harvest 886 Sep 30 11:22 poller_unix.log
I can try to dig up some strace commands if you want to try to check why the process is not writing to that file. How are you starting the process? bin/harvest, bin/poller, systemd?
By systemd
ah ok, can you paste your systemd service file?
A service file for Harvest poller instance or HTTP service discovery?
are the log messages you see in var/log/message admin node related or poller related?
Here is the logs in /var/log/messages
interesting implies that came from <daemon.info>
BTW, this kind of messages write to /var/log/messages in almost each second and make /var filesystem full. That's why I discover this problem.
those log message are from the pollers so back to your question. can you paste the service file for Harvest poller instance. Are you monitoring many clusters - those logs are INFO level and shouldn't be too chatty, but either way, we can fix. After you share the service file, we could also try running manually and making sure that works correctly permission wise
for example, if you 1) cd to your harvest install directory 2) su to the correct user if needed 3) run bin/harvest start unix this assumes you have the unix poller in your harvest.yml 4) run ps aux | grep poller and ensure it's running 5) check ls -la /var/log/harvest
gotcha so you adapted https://github.com/NetApp/harvest/tree/main/service/contrib
do you see anything in your /var/log/messages abourt Failed at step EXEC spawning or any errors related to the pollers? I guess not since it sounds like they're running fine just not logging where you want
I did what you mentioned, I found the log can write to /var/log/harvest now
I've got an idea, one sec
ok I see what's going on. try editting your service file and add the --logtofile argument to the start command like so:
ExecStart=/appl/san/harvest2/harvest-22.08.0/bin/harvest --config /appl/san/harvest2/harvest-22.08.0/harvest.yml start --logtofile -f %i
when using -f harvest logs to the foreground, which sysout, which systemd is sending to the journal and messages in your case
Yes, adding --logtofile argument to the start command, I can find the poller log writes to /var/log/harvest directory now
@undone peak Thank you very much for diagnosis and solve this issue
you bet, we'll work to improve this
May I know if you will update it in creating service file for poller instance?
yes, that's one of the places I'll change. I want to figure out if this is a RHEL only issue. Typically you want to log to stdout so it is logged to the journal. What is surprising is it's also logging to messages. My guess is journald on RHEL8 is setup to do both, but want to double check before I update the example.
I see. Again, thanks for helping to solve the problem on this issue. Cheer.