Skip to content

Commit

Permalink
Issue #4465: Update metricshub.json (#4482)
Browse files Browse the repository at this point in the history
* Issue #4465: Add Sha2 and Sha3 protocols to metricshub schema

* Update metrichub.json hostname field
* Add support for SnmpV3 Sha2 and Sha3 protocols
* Update metricshub.yaml

* Issue #4465: Add Sha2 and Sha3 protocols to metricshub schema

* Fix prettier issues
  • Loading branch information
MedMaalej authored Feb 24, 2025
1 parent 7910ad4 commit 2fc9a8b
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 8 deletions.
23 changes: 19 additions & 4 deletions src/schemas/json/metricshub.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,16 @@
},
"authType": {
"type": "string",
"enum": ["NO_AUTH", "MD5", "SHA"],
"description": "Sets the SNMPv3 authentication type. (MD5, SHA or NO_AUTH)."
"enum": [
"NO_AUTH",
"MD5",
"SHA",
"SHA256",
"SHA512",
"SHA224",
"SHA384"
],
"description": "Sets the SNMPv3 authentication type. (MD5, SHA, SHA256, SHA512, SHA384, SHA224 or NO_AUTH)."
},
"privacy": {
"type": "string",
Expand Down Expand Up @@ -1425,8 +1433,15 @@
"default": "5m"
},
"hostname": {
"type": "string",
"description": "The hostname to which the query is sent."
"description": "The hostname to which the query is sent.",
"oneOf": [
{
"type": "array"
},
{
"type": "string"
}
]
},
"retryIntervals": {
"type": "array",
Expand Down
123 changes: 119 additions & 4 deletions src/test/metricshub/metricshub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ resourceGroups:
timeout: 120

#═══════════════════════════════════════════════════
# SNMP v3 protocol configuration
# SNMP v3 protocol configuration with SHA1
#═══════════════════════════════════════════════════

server-13:
Expand All @@ -400,19 +400,134 @@ resourceGroups:
- 300

#═══════════════════════════════════════════════════
# JDBC Configuration
# SNMP v3 protocol configuration with SHA256
#═══════════════════════════════════════════════════

server-14:
attributes:
host.name: server-14
host.type: linux
protocols:
snmpv3:
port: 161
timeout: 120s
contextName: myContext
authType: SHA256
privacy: DES
username: myUser
privacyPassword: myPrivacyPassword
password: myAuthPassword
retryIntervals:
- 100
- 200
- 300

#═══════════════════════════════════════════════════
# SNMP v3 protocol configuration with SHA224
#═══════════════════════════════════════════════════

server-15:
attributes:
host.name: server-15
host.type: linux
protocols:
snmpv3:
port: 161
timeout: 120s
contextName: myContext
authType: SHA224
privacy: none
username: myUser
password: myAuthPassword
retryIntervals:
- 100
- 200
- 300
#═══════════════════════════════════════════════════
# SNMP v3 protocol configuration with SHA512
#═══════════════════════════════════════════════════

server-16:
attributes:
host.name: server-16
host.type: linux
protocols:
snmpv3:
port: 161
timeout: 120s
contextName: myContext
authType: SHA512
privacy: DES
privacyPassword: myPrivacyPassword
username: myUser
password: myAuthPassword
retryIntervals:
- 100
- 200
- 300

#═══════════════════════════════════════════════════
# SNMP v3 protocol configuration with SHA384
#═══════════════════════════════════════════════════

server-17:
attributes:
host.name: server-17
host.type: linux
protocols:
snmpv3:
port: 161
timeout: 120s
contextName: myContext
authType: SHA384
privacy: DES
privacyPassword: myPrivacyPassword
username: myUser
password: myAuthPassword
hostname: server-17
retryIntervals:
- 100
- 200
- 300

#═══════════════════════════════════════════════════
# SNMP v3 protocol configuration with MD5
#═══════════════════════════════════════════════════

server-18:
attributes:
host.name: server-18
host.type: linux
protocols:
snmpv3:
port: 161
timeout: 120s
contextName: myContext
authType: MD5
privacy: DES
privacyPassword: myPrivacyPassword
username: myUser
password: myAuthPassword
hostname: [server-15, server-16]
retryIntervals:
- 100
- 200
- 300

#═══════════════════════════════════════════════════
# JDBC Configuration
#═══════════════════════════════════════════════════

server-19:
attributes:
host.name: server-19
host.type: linux
protocols:
jdbc:
hostname: server-14
hostname: server-19
username: dbuser
password: dbpassword
url: jdbc:mysql://server-14:3306/mydatabase
url: jdbc:mysql://server-19:3306/mydatabase
timeout: 120s
type: mysql
port: 3306
Expand Down

0 comments on commit 2fc9a8b

Please sign in to comment.