From f677e7e93e55840a485683b4621361301436c10c Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 9 Dec 2019 14:06:29 +0100 Subject: [PATCH] TT#71550 Add a test for SNMP output We should at least guarantee that there is one of each OID type on one node. Change-Id: Iebc080e3e52585fbb6421d6fa04c854206f5cf4d --- templates/915_service-snmp.yaml.tt2 | 76 +++++++++++++++++++++++++++++ templates/goss.yaml.tt2 | 1 + 2 files changed, 77 insertions(+) create mode 100644 templates/915_service-snmp.yaml.tt2 diff --git a/templates/915_service-snmp.yaml.tt2 b/templates/915_service-snmp.yaml.tt2 new file mode 100644 index 0000000..f00ade6 --- /dev/null +++ b/templates/915_service-snmp.yaml.tt2 @@ -0,0 +1,76 @@ +command: + + snmpwalk -v2c -cpublic localhost sipwise: + exit-status: 0 + stdout: + - "/::licIndex\.1 = /" + - "/::licType\.1 = /" + - "/::licValue\.1 = /" + - "/::licOID\.1 = /" + - "/::cnIndex\.1 = /" + - "/::cnName\.1 = /" + - "/::cnCpuTotal\.1 = /" + - "/::cnAddressIndex\.1 = /" + - "/::cnAddressIface\.1 = /" + - "/::cnAddressType\.1 = /" + - "/::cnAddress\.1 = /" + - "/::cnRoleIndex\.1 = /" + - "/::cnRole\.1 = /" + - "/::ngcpProvSubs = /" + - "/::ngcpCollectiveCheckResult = /" + - "/::ngcpCollectiveCheckOutput = /" + - "/::ngcpClusterProvSubs = /" + - "/::ngcpClusterRegSubs = /" + - "/::ngcpClusterRegDevs = /" + - "/::procIndex\.1\.1 = /" + - "/::procName\.1\.1 = /" + - "/::procStatus\.1\.1 = /" + - "/::procMonitoringStatus\.1\.1 = /" + - "/::procPid\.1\.1 = /" + - "/::procParentPid\.1\.1 = /" + - "/::procUptime\.1\.1 = /" + - "/::procChildren\.1\.1 = /" + - "/::procMemory\.1\.1 = /" + - "/::procMemoryTotal\.1\.1 = /" + - "/::procDataCollected\.1\.1 = /" + - "/::dbIndex\.1\.1 = /" + - "/::dbSlaveIORunning\.1\.1 = /" + - "/::dbSlaveIOLastError\.1\.1 = /" + - "/::dbSlaveIOLastErrorDesc\.1\.1 = /" + - "/::dbSlaveSQLRunning\.1\.1 = /" + - "/::dbSlaveSQLLastError\.1\.1 = /" + - "/::dbSlaveSQLLastErrorDesc\.1\.1 = /" + - "/::dbSlaveQueryRate\.1\.1 = /" + - "/::dbSlaveReplDelay\.1\.1 = /" + - "/::dbSlaveReplDiff\.1\.1 = /" + - "/::load1min\.1 = /" + - "/::load5min\.1 = /" + - "/::load15min\.1 = /" + - "/::memTotal\.1 = /" + - "/::memUsed\.1 = /" + - "/::memFree\.1 = /" + - "/::memShared\.1 = /" + - "/::memCached\.1 = /" + - "/::swapTotal\.1 = /" + - "/::sawpUsed\.1 = /" + - "/::sawpFree\.1 = /" + - "/::fsIndex\.1\.1 = /" + - "/::fsMount\.1\.1 = /" + - "/::fsSize\.1\.1 = /" + - "/::fsUsed\.1\.1 = /" + - "/::hbStatusProc\.1 = /" + - "/::hbStatusHost\.1 = /" + - "/::hbStatusNode\.1 = /" + - "/::mailQueue\.1 = /" + - "/::asrCur\.1 = /" + - "/::nerCur\.1 = /" + - "/::ccCur\.1 = /" + - "/::ccCur\.1 = /" + - "/::emCur\.1 = /" + - "/::dialogActiveCur\.1 = /" + - "/::dialogLocalCur\.1 = /" + - "/::dialogRelayCur\.1 = /" + - "/::dialogIncomingCur\.1 = /" + - "/::dialogOutgoingCur\.1 = /" + stderr: [] + timeout: 10000 diff --git a/templates/goss.yaml.tt2 b/templates/goss.yaml.tt2 index 502c68c..548be75 100644 --- a/templates/goss.yaml.tt2 +++ b/templates/goss.yaml.tt2 @@ -39,6 +39,7 @@ gossfile: 910_service-influxdb.yaml: {} 911_service-grafana.yaml: {} [% IF general.ngcp_type != 'spce' -%] + 915_service-snmp.yaml: {} 920_service-asterisk-odbc-pro.yaml: {} 930_service-mariadb.yaml: {} [% END -%]