Add a new REST ISCSISession template #2616
Replies: 4 comments 6 replies
-
|
This is great, thank you for working this out. I just see many warnings like, I think for same initiator, only one |
Beta Was this translation helpful? Give feedback.
-
|
@chuan137 See if below template fixes warnings. name: ISCSISession
query: api/protocols/san/iscsi/sessions
object: iscsi_session
counters:
- ^^connections.#.initiator_address.address => initiator_address
- ^^initiator.name => initiator
- ^^tsih => tsih
- ^svm.name => svm
export_options:
instance_keys:
- initiator
- initiator_address
- tsih
instance_labels:
- svm |
Beta Was this translation helpful? Give feedback.
-
|
@chuan137 See if below works. name: ISCSISession
query: api/protocols/san/iscsi/sessions
object: iscsi_session
counters:
- ^^connections.#.initiator_address.address => initiator_address
- ^^initiator.name => initiator
- ^^tsih => tsih
- ^svm.name => svm
plugins:
- LabelAgent:
split_regex:
- initiator `:(.*?):` host
export_options:
instance_keys:
- initiator
- initiator_address
- tsih
instance_labels:
- host
- svm |
Beta Was this translation helpful? Give feedback.
-
|
@chuan137 I have updated the regex in the template below to accommodate other naming conventions for the name: ISCSISession
query: api/protocols/san/iscsi/sessions
object: iscsi_session
counters:
- ^^connections.#.initiator_address.address => initiator_address
- ^^initiator.name => initiator
- ^^tsih => tsih
- ^svm.name => svm
plugins:
- LabelAgent:
split_regex:
- initiator `:(.*?)(:|$)` host,
export_options:
instance_keys:
- initiator
- initiator_address
- tsih
instance_labels:
- host
- svm |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note: These steps are for NABox.
Prerequisite: ssh to NABox via root
Step 1: Create
custom_iscsi.yamlNavigate to the
restdirectory:cd /opt/harvest2-conf/conf/restCreate custom_iscsi.yaml:
Update the file with the following content:
Step 2: Create
iscsi_session.yamlNavigate to the
9.6.0directory:cd /opt/harvest2-conf/conf/rest/9.6.0Create
iscsi_session.yaml:Update the file with the following content:
Step 3: Restart NABox containers
Step 4: Validate ISCSISession Collection in Harvest
Wait for at least 1 minute. To ensure that the
Rest:ISCSISessionmetrics are being collected, run the following command:In the screenshot below, you can see that the poller
pstejska_vsimis collectingRest:ISCSISessioninstances.Step 5: Verify ISCSISession Metrics are in Prometheus
Confirm that the ISCSISession metrics are being scraped by Prometheus by running the following query from Prometheus (
https://NABox/prometheus):Beta Was this translation helpful? Give feedback.
All reactions