#REST lock summary not exporting?

1 messages · Page 1 of 1 (latest)

barren ledge
#

I have lock summary from ONTAPI that is working and doing counts of locks based on the specificly called out lock counts.

This is the same in REST, but even though it's telling me it's exporting the metrics, it's not appearing anywhere in the polller output.

Here's what I have done:

enabled lock: lock.yaml in rest/custom.yaml

it shows this in the logs:

time=2026-03-19T11:11:38.724-07:00 level=INFO source=helpers.go:113 msg="best-fit template" Poller=node02 collector=Rest:Lock path=conf/rest/9.10.0/lock.yaml v=9.16.1 jitter=none
time=2026-03-19T11:11:39.904-07:00 level=INFO source=collector.go:652 msg=Collected Poller=node02 collector=Rest:Lock task=counter apiMs=1028 bytesRx=0 metrics=0 numCalls=0 pollMs=1028 zBegin=1773943898876
time=2026-03-19T11:11:58.667-07:00 level=INFO source=collector.go:620 msg=Collected Poller=node02 collector=Rest:Lock apiMs=18761 bytesRx=234664 calcMs=0 exportMs=0 instances=369 instancesExported=59 metrics=2583 metricsExported=59 numCalls=2 parseMs=2 pluginInstances=59 pluginMs=1 pollMs=18763 renderedBytes=5137 zBegin=1773943899904

but I don't see anything in the poller output.

Here's the output we get from our standard ONTAPI poller:

netapp_lock_lif_count{datacenter="DC",cluster="node02",lif="node02n17b-01"} 35
netapp_lock_node_count{datacenter="DC",cluster="node02",node="node02n17b"} 119
netapp_lock_svm_count{datacenter="DC",cluster="node02",svm="clusterv02a"} 370
netapp_lock_volume_count{datacenter="DC",cluster="node02",volume="my_volume_2"} 2

I don't see any lock metrics in the REST poller output.

dusk drift
barren ledge
#

which metrics?

#

from the OS REST call or from the exporter that the poller creates? There is alot of data in either case

dusk drift
#

@barren ledge Could you check whether the relevant lock metrics are exported when you run the CLI command below? If the metrics aren’t present, please share the output from the REST endpoint.

bin/poller --poller dc-1 --collectors Rest --objects Lock --config harvest.yml --promPort 12999
barren ledge
#

this is what I get

#

time=2026-03-23T10:28:21.069-07:00 level=INFO source=poller.go:240 msg=Init Poller=node02 logLevel=INFO configPath=harvest.yml cwd=/opt/harvest version="harvest version 26.03.17-nightly (commit ce679d0e) (build date 2026-03-17T00:22:44-0400) linux/amd64" fips=false options="&{Poller:node02 Daemon:false Debug:false PromPort:129999 Config:harvest.yml HomePath: LogPath:/var/log/harvest/ LogFormat:plain LogLevel:2 LogToFile:false Version:26.03.17 Hostname:othernode02 Collectors:[Rest] Objects:[Lock] Profiling:0 Asup:false IsTest:false ConfPath:conf ConfPaths:[conf]}"
time=2026-03-23T10:28:21.070-07:00 level=INFO source=poller.go:279 msg="started in foreground" Poller=node02 pid=7142
time=2026-03-23T10:28:21.190-07:00 level=INFO source=poller.go:1836 msg="Cluster info" Poller=node02 remote="{Name:node02 Model:cdot UUID:eb4fd694-ed9c-11e3-9fe1-123478563412 Version:9.16.1 Release:NetApp Release 9.16.1P1: Fri Feb 14 03:53:50 UTC 2025 Serial: IsSanOptimized:false IsDisaggregated:false ZAPIsExist:false ZAPIsChecked:false HasREST:true IsClustered:true}"
time=2026-03-23T10:28:21.191-07:00 level=WARN source=poller.go:880 msg="init collector-object" Poller=node02 error="template name is empty. Make sure the object is defined in your default.yaml, confPath: [conf]" collector=Rest object=Lock
time=2026-03-23T10:28:21.191-07:00 level=WARN source=poller.go:352 msg="no collectors initialized, stopping" Poller=node02
time=2026-03-23T10:28:21.191-07:00 level=INFO source=poller.go:688 msg="stopping poller" Poller=node02 pid=7142

I had to move promPort to 129999 due to conflict with another used port on the host.

#

clearly it's not doing the standard 'combination' with custom.yaml and default.yaml, as it should have found it

acoustic willow
#

hi @barren ledge can you check if you have uncommented the # Lock: lock.yaml line in your conf/rest/default.yaml?

#

can you paste your conf/rest/custom.yaml?

#

the log msg is saying that the Lock object is missing. That means one or multiple of these is happening:

  • you have not uncommented the lock line in your conf/rest/default.yaml
  • that line is missing from your conf/rest/custom.yaml
  • the custom.yaml is in the wrong location and not being loaded
  • the custom.yaml is not formatted correctly
barren ledge
#

weird, I thought I had added it to custom, let me check again

#

maybe that is why it's not showing up

#

BAH

#

I guess this is the correct statement for why we use CFengine:

Listen, and understand. CFengine is out there. It can't be bargained with. It can't be reasoned with. It doesn't feel pity, or remorse, or fear. And it absolutely will not stop, ever, until your change is reversed.

#

clearly this occurred to me

acoustic willow
#

glad you got it sorted

barren ledge
#

I would have sworn that I made that change before I sent this and verified it

#

🙁

acoustic willow
#

it happens...

barren ledge
#

waiting for the metrics to publish since the restart, they are slowly trickling in

#

completely unrelated, the reason I found this was a script I had openai create for me that would compare the old 'ONTAPI' metrics against what is in with the REST equivalents, including the labels on those metrics, to make sure I am getting both the metrics and the labels (that I feel are necessary to limit upstream changes of some of our code)

#

otherwise, I might have missed this

acoustic willow
#

nice

barren ledge
#

it's working now, sorry for not catching that I got dupped by CFEngine

acoustic willow
#

no worries, glad you figured it out

barren ledge
#

I have found that some of the labels have disappeared from some of the metrics, to be incorported in a '_labels' metric and not all the ancilary metrics related to it

#

ex. disk_new_status is missing container_type, failed and model labels but the disk_labels has it

#

I'm guessing that is something that occurred when the move from ONTAPI to REST started

acoustic willow
#

we'll need to check on that one. Feel free to ping us here or open issues if you think any of these changes are bugs or impact you

barren ledge
#

I think I have worked around most of them, but will continue to evaluate any potential impact from lack of labels and/or metrics