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.
-
Note: These steps are for NABox.
Prerequisite: ssh to NABox via root
Step 1: Create
custom_iscsi.yaml
Navigate to the
rest
directory:cd /opt/harvest2-conf/conf/rest
Create custom_iscsi.yaml:
Update the file with the following content:
Step 2: Create
iscsi_session.yaml
Navigate to the
9.6.0
directory:cd /opt/harvest2-conf/conf/rest/9.6.0
Create
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:ISCSISession
metrics are being collected, run the following command:In the screenshot below, you can see that the poller
pstejska_vsim
is collectingRest:ISCSISession
instances.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