Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding zapi/rest templates for lock-get-iter & protocols/locks #2706

Merged
merged 6 commits into from
Mar 4, 2024

Conversation

Hardikl
Copy link
Contributor

@Hardikl Hardikl commented Feb 23, 2024

Adding the zapi template for lock-get-iter.

With these below promQL queries, we can get lock count by volume, vserver, lif, node and cluster level and use them for alerting purpose.

image

@cla-bot cla-bot bot added the cla-signed label Feb 23, 2024
@Hardikl Hardikl linked an issue Feb 23, 2024 that may be closed by this pull request
@Hardikl
Copy link
Contributor Author

Hardikl commented Feb 26, 2024

Only Node, Lif, Vserver and Volume level aggregated metrics of new_status are exported.

harvest % ./bin/poller -p sar -c Zapi -o Lock --promPort 13001                          
2024-02-26T15:24:31+05:30 INF poller/poller.go:215 > Init Poller=sar asup=false confPath=conf config=harvest.yml configPath=harvest.yml daemon=false debug=false homePath= hostname=hardikl-mac-0 logLevel=info logPath=/var/log/harvest/ profiling=0 promPort=13001 version="harvest version 24.02.2615-v24.02.0 (commit 538e3a75) (build date 2024-02-26T15:23:33+0530) darwin/amd64"
2024-02-26T15:24:31+05:30 INF poller/poller.go:239 > started in foreground Poller=sar pid=17546
2024-02-26T15:24:33+05:30 INF collector/helpers.go:84 > best-fit template Poller=sar collector=Zapi:Lock path=conf/zapi/cdot/9.8.0/lock.yaml v=9.13.1
2024-02-26T15:24:33+05:30 INF poller/poller.go:357 > Autosupport scheduled. Poller=sar asupSchedule=24h
2024-02-26T15:24:33+05:30 INF poller/poller.go:366 > poller start-up complete Poller=sar
2024-02-26T15:24:33+05:30 INF prometheus/httpd.go:40 > server listen Poller=sar exporter=prometheus1 url=http://:13001/metrics
2024-02-26T15:24:33+05:30 INF poller/poller.go:523 > updated status, up collectors: 1 (of 1), up exporters: 1 (of 1) Poller=sar
2024-02-26T15:24:36+05:30 INF collector/collector.go:585 > Collected Poller=sar apiMs=2273 calcMs=0 collector=Zapi:Lock exportMs=0 instances=75 instancesExported=5 metrics=525 metricsExported=13 parseMs=4 pluginMs=0 pollMs=2278 zBegin=1708941273878
harvest %  curl -s http://localhost:13001/metrics | grep -Ev "#|metadata_"   
node_lock_new_status{cluster="umeng-aff300-01-02",datacenter="rest",node="umeng-aff300-02"} 75
vserver_lock_new_status{cluster="umeng-aff300-01-02",datacenter="rest",vserver="astra_301"} 75
lif_lock_new_status{cluster="umeng-aff300-01-02",datacenter="rest",lif="astra_301_lif"} 75
volume_lock_new_status{cluster="umeng-aff300-01-02",datacenter="rest",volume="trident_pvc_cf16c72a_044e_4e3c_9b04_d2cf06efd0c4"} 35
volume_lock_new_status{cluster="umeng-aff300-01-02",datacenter="rest",volume="trident_pvc_7ae88770_5935_4fb5_9d26_0f230688f8b3"} 40
image

conf/zapi/default.yaml Outdated Show resolved Hide resolved
conf/zapi/default.yaml Outdated Show resolved Hide resolved
@Hardikl
Copy link
Contributor Author

Hardikl commented Feb 28, 2024

harvest %  curl -s http://localhost:13001/metrics | grep -Ev "#|metadata_"   
lif_lock_count{cluster="umeng-aff300-01-02",datacenter="zapi",lif="astra_301_lif"} 49
volume_lock_count{cluster="umeng-aff300-01-02",datacenter="zapi",volume="trident_pvc_7ae88770_5935_4fb5_9d26_0f230688f8b3"} 21
volume_lock_count{cluster="umeng-aff300-01-02",datacenter="zapi",volume="trident_pvc_cf16c72a_044e_4e3c_9b04_d2cf06efd0c4"} 28
node_lock_count{cluster="umeng-aff300-01-02",datacenter="zapi",node="umeng-aff300-02"} 49
svm_lock_count{cluster="umeng-aff300-01-02",datacenter="zapi",svm="astra_301"} 49

harvest %  curl -s http://localhost:13002/metrics | grep -Ev "#|metadata_"   
node_lock_count{cluster="umeng-aff300-01-02",datacenter="rest",node="umeng-aff300-02"} 49
svm_lock_count{cluster="umeng-aff300-01-02",datacenter="rest",svm="astra_301"} 49
lif_lock_count{cluster="umeng-aff300-01-02",datacenter="rest",lif="astra_301_lif"} 49
volume_lock_count{cluster="umeng-aff300-01-02",datacenter="rest",volume="trident_pvc_cf16c72a_044e_4e3c_9b04_d2cf06efd0c4"} 28
volume_lock_count{cluster="umeng-aff300-01-02",datacenter="rest",volume="trident_pvc_7ae88770_5935_4fb5_9d26_0f230688f8b3"} 21

@Hardikl Hardikl changed the title feat: Adding zapi template for lock-get-iter feat: Adding zapi/rest templates for lock-get-iter & protocols/locks Feb 28, 2024
conf/zapi/cdot/9.8.0/lock.yaml Outdated Show resolved Hide resolved
conf/rest/9.10.0/lock.yaml Outdated Show resolved Hide resolved
@cgrinds cgrinds merged commit 2b46b66 into main Mar 4, 2024
10 checks passed
@cgrinds cgrinds deleted the hl_lock branch March 4, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock counts by node (and possibly cluster)
3 participants