<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OneView and SNMPv1 in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193867#M8323</link>
    <description>&lt;P&gt;We aren't on 8 yet, but I do have SNMPv1 disabled on all iLOs.&amp;nbsp; Did it with this code.&amp;nbsp; First get session credentials to OneView.&amp;nbsp; Then pull down a list of all hardware in OneView:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# We have multiple sites.  So, I set a site variable so that I can run the same commands
# simultaneously in multiple terminals.
SITE='&amp;lt;site name&amp;gt;'
HARDWN=hardw-${SITE}
curl --insecure \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --output ${HARDWN} \
     --request GET ${OneView}/rest/server-hardware?start=0&amp;amp;count=-1
#
# That only pulls down 32 devices.  Pull down the rest with:
i=1
NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(/rest/server-hardware.*\)","prevPageUri.*|\1|' ${HARDWN})
while [[ ${NEXT} != *"null"* ]]; do
   curl --insecure \
        --header "X-API-Version: ${currentVersion}" \
        --header "auth: ${sessionID}" \
        --output ${HARDWN}${i} \
        --request GET ${OneView}${NEXT}
   NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(/rest/server-hardware.*\)","prevPageUri.*|\1|' ${HARDWN}${i})
   if [[ ${#NEXT} -gt 50 ]]; then
      NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(.*\)","prevPageUri.*|\1|' ${HARDWN}${i})
   fi
   ((i++))
done
# Concantenate into a single file.
j=0
while [[ ${j} -t ${i} ]]; do
   echo ${j}
   if [[ ${j} -eq 0 ]]; then
      CMD="cat ${HARDWN}"
   else
      CMD="${CMD} ${HARDWN}${j}"
   fi
   ((j++))
done
$(echo ${CMD} &amp;gt; hardw-all-raw-${SITE})
cat hardw-all-raw-${SITE} | jq -r '.' &amp;gt; hardw-${SITE}-all
HARDW=hardw-${SITE}-all
/bin/rm hardw-${SITE} hardw-${SITE}? hardw-${SITE}[1-9]? hardw-all-raw-${SITE}&lt;/LI-CODE&gt;&lt;P&gt;Then make sure SNMP is enabled, disable SNMP v1, and reset the iLO interface:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Get OneView session credentials
# Pull down a list of all current hardware.  Set the variable, HARDW, to the downloaded list.
# Set three JSON variables
echo '{"SNMP": {"ProtocolEnabled": true }}' | jq -c '.' &amp;gt; snmp
echo '{"SNMPv1Enabled": false }' | jq -c '.' &amp;gt; snmpv1
echo '{"Action": "Manager.Reset"}' | jq -c '.' &amp;gt; resetiLO
#
for SERVER in $(jq -r '.members[] | "\(.name)"' ${HARDW}); do
   UUID=$(jq -r '.members[] | select(.name=="'${SERVER}'") | "\(.uuid)"' ${HARDW})
   read iLOSSO iLOAuth &amp;lt;&amp;lt;&amp;lt; $(curl --silent --insecure --header "X-API-Version": ${currentVersion}" \
      --header "auth: ${sessionID}" \
      --request GET ${OneView}/reset/server-hardware/${UUID}/remoteConsoleUrl | \
      jq -r '.remoteConsoleUrl' | sed -e 's|hplocons|https|' -e 's|addr=||' \
      -e 's|^\(.*\)&amp;amp;sessionkey=\(.*\)$|\1 \2|')
   curl --silent --insecure --include \
      --header "X-Auth-Token: ${iLOAuth}" \
      --header "Content-Type: application/json" \
      --location --data "@snmp" \
      --request PATCH ${iLOSSO}/redfish/v1/Managers/1/networkprotocol
   curl --silent --insecure --include \
      --header "X-Auth-Token: ${iLOAuth}" \
      --header "Content-Type: application/json" \
      --location --data "@snmpv1" \
      --request PATCH ${iLOSSO}/redfish/v1/Managers/1/SnmpService
   curl --silent --insecure --include \
      --header "X-Auth-Token: ${iLOAuth}" \
      --header "Content-Type: application/json" \
      --location --data "@resetiLO" \
      --request POST ${iLOSSO}/redfish/v1/Managers/1/Actions/Manager.Reset
done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 14:18:47 GMT</pubDate>
    <dc:creator>bradawk1</dc:creator>
    <dc:date>2023-08-09T14:18:47Z</dc:date>
    <item>
      <title>OneView and SNMPv1</title>
      <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193713#M8308</link>
      <description>&lt;P&gt;I disabled SNMPv1 on all ILOs by purpose, but as we have to switch from ILO Amplifier to OneView, this was now automaticially enabled again by OV.&amp;nbsp; This is also documented here&amp;nbsp;&lt;A href="https://support.hpe.com/hpesc/public/docDisplay?docId=sd00002887en_us&amp;amp;docLocale=en_US&amp;amp;page=GUID-D7147C7F-2016-0901-066E-0000000026F8.html" target="_blank"&gt;Document - HPE OneView 8.4 User Guide for VMs | HPE Support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Aug 7 08:02:00 xxxx iLO5 iLO SNMP settings modified by: _HPOneViewMonitor.&lt;BR /&gt;Aug 7 08:03:28 xxxx&amp;nbsp; iLO5 iLO SNMP settings modified by: _HPOneViewAdmin.&lt;/P&gt;&lt;P&gt;Aug 7 08:19:01 xxxx&amp;nbsp; iLO5 iLO &lt;SPAN&gt;Overall security status of the system is at risk.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It's kind of funny that the security state then changed to risk and OV alerts me about SNMPv1 being enabeld. With redfish etc. is it really necessary to keep SNMPv1 active?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 04:46:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193713#M8308</guid>
      <dc:creator>pirx</dc:creator>
      <dc:date>2023-08-14T04:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: OneView and SNMPv1</title>
      <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193867#M8323</link>
      <description>&lt;P&gt;We aren't on 8 yet, but I do have SNMPv1 disabled on all iLOs.&amp;nbsp; Did it with this code.&amp;nbsp; First get session credentials to OneView.&amp;nbsp; Then pull down a list of all hardware in OneView:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# We have multiple sites.  So, I set a site variable so that I can run the same commands
# simultaneously in multiple terminals.
SITE='&amp;lt;site name&amp;gt;'
HARDWN=hardw-${SITE}
curl --insecure \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --output ${HARDWN} \
     --request GET ${OneView}/rest/server-hardware?start=0&amp;amp;count=-1
#
# That only pulls down 32 devices.  Pull down the rest with:
i=1
NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(/rest/server-hardware.*\)","prevPageUri.*|\1|' ${HARDWN})
while [[ ${NEXT} != *"null"* ]]; do
   curl --insecure \
        --header "X-API-Version: ${currentVersion}" \
        --header "auth: ${sessionID}" \
        --output ${HARDWN}${i} \
        --request GET ${OneView}${NEXT}
   NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(/rest/server-hardware.*\)","prevPageUri.*|\1|' ${HARDWN}${i})
   if [[ ${#NEXT} -gt 50 ]]; then
      NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(.*\)","prevPageUri.*|\1|' ${HARDWN}${i})
   fi
   ((i++))
done
# Concantenate into a single file.
j=0
while [[ ${j} -t ${i} ]]; do
   echo ${j}
   if [[ ${j} -eq 0 ]]; then
      CMD="cat ${HARDWN}"
   else
      CMD="${CMD} ${HARDWN}${j}"
   fi
   ((j++))
done
$(echo ${CMD} &amp;gt; hardw-all-raw-${SITE})
cat hardw-all-raw-${SITE} | jq -r '.' &amp;gt; hardw-${SITE}-all
HARDW=hardw-${SITE}-all
/bin/rm hardw-${SITE} hardw-${SITE}? hardw-${SITE}[1-9]? hardw-all-raw-${SITE}&lt;/LI-CODE&gt;&lt;P&gt;Then make sure SNMP is enabled, disable SNMP v1, and reset the iLO interface:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Get OneView session credentials
# Pull down a list of all current hardware.  Set the variable, HARDW, to the downloaded list.
# Set three JSON variables
echo '{"SNMP": {"ProtocolEnabled": true }}' | jq -c '.' &amp;gt; snmp
echo '{"SNMPv1Enabled": false }' | jq -c '.' &amp;gt; snmpv1
echo '{"Action": "Manager.Reset"}' | jq -c '.' &amp;gt; resetiLO
#
for SERVER in $(jq -r '.members[] | "\(.name)"' ${HARDW}); do
   UUID=$(jq -r '.members[] | select(.name=="'${SERVER}'") | "\(.uuid)"' ${HARDW})
   read iLOSSO iLOAuth &amp;lt;&amp;lt;&amp;lt; $(curl --silent --insecure --header "X-API-Version": ${currentVersion}" \
      --header "auth: ${sessionID}" \
      --request GET ${OneView}/reset/server-hardware/${UUID}/remoteConsoleUrl | \
      jq -r '.remoteConsoleUrl' | sed -e 's|hplocons|https|' -e 's|addr=||' \
      -e 's|^\(.*\)&amp;amp;sessionkey=\(.*\)$|\1 \2|')
   curl --silent --insecure --include \
      --header "X-Auth-Token: ${iLOAuth}" \
      --header "Content-Type: application/json" \
      --location --data "@snmp" \
      --request PATCH ${iLOSSO}/redfish/v1/Managers/1/networkprotocol
   curl --silent --insecure --include \
      --header "X-Auth-Token: ${iLOAuth}" \
      --header "Content-Type: application/json" \
      --location --data "@snmpv1" \
      --request PATCH ${iLOSSO}/redfish/v1/Managers/1/SnmpService
   curl --silent --insecure --include \
      --header "X-Auth-Token: ${iLOAuth}" \
      --header "Content-Type: application/json" \
      --location --data "@resetiLO" \
      --request POST ${iLOSSO}/redfish/v1/Managers/1/Actions/Manager.Reset
done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 14:18:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193867#M8323</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-09T14:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: OneView and SNMPv1</title>
      <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193872#M8324</link>
      <description>&lt;P&gt;Well, I know how to disable SNMPv1, I did it before on all ILOs with....&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ilorest --nologo set SNMPv1Enabled=False --commit --select=HpeiLOSnmpService. {{ilo_connect_string }}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Strange thing is that the securtiy status changed after adding the servers to OV. And the only thing I see in dashboard that is red is SNMPv1.&lt;/P&gt;&lt;P&gt;But ilorest tool and redfish still report snmpv1 as disabled, even if it there is an alert about it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;iLOrest &amp;gt; get SNMPv1Enabled --select=HpeiLOSnmpService.&lt;/P&gt;&lt;P&gt;Discovering data...Done&lt;BR /&gt;SNMPv1Enabled=False&lt;BR /&gt;iLOrest &amp;gt; set SNMPv1Enabled=False --commit --select=HpeiLOSnmpService.&lt;BR /&gt;ERROR : Nothing changed for attribute 'snmpv1enabled'.&lt;BR /&gt;Please check if the attribute exists or Read-only or System Unique property or the value trying to set is same or invalid&lt;BR /&gt;iLOrest &amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Overall security status of the system is at risk.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;Active&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;8/4/23&amp;nbsp; 12:08:29 pm&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;BLOCKQUOTE&gt;Resolution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt;Navigate to the 'Security Dashboard' tab under the 'Information' section on the iLO Web UI in order to evaluate your configuration for potential risks and view advice on improving system security.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 1277px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/136622i52544C60FB3F21A8/image-size/large?v=v2&amp;amp;px=2000" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 292px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/136623i0FAB7455A31A6803/image-size/large?v=v2&amp;amp;px=2000" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 1410px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/136624i952B055614229575/image-size/large?v=v2&amp;amp;px=2000" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 14:42:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193872#M8324</guid>
      <dc:creator>pirx</dc:creator>
      <dc:date>2023-08-09T14:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: OneView and SNMPv1</title>
      <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193875#M8326</link>
      <description>&lt;P&gt;Your security dashboard is showing snmp v1 is enabled.&amp;nbsp; Are you sure you disabled it?&amp;nbsp; On one of my iLO 5s it shows SNMPv1&amp;nbsp;&amp;nbsp; OK&amp;nbsp;&amp;nbsp; Disabled&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (slider is to the right).&amp;nbsp;&amp;nbsp; We have 2.78 firmware.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 15:13:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193875#M8326</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-09T15:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: OneView and SNMPv1</title>
      <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193885#M8328</link>
      <description>&lt;P&gt;That is what confuses me. During server deployment I use ilorest in an ansible playbook to disable snmpv1, like below.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;iLOrest &amp;gt; set SNMPv1Enabled=False --commit --select=HpeiLOSnmpService.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;With that the alert in dashboard gets cleared. Now, OV enabled snmpv1 again, but the state in ilorest tool still tells me snmpv1 is disabled, but the dashboard shows the alert.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;iLOrest &amp;gt; get SNMPv1Enabled --select=HpeiLOSnmpService.&lt;/P&gt;&lt;P&gt;Discovering data...Done&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;SNMPv1Enabled=False&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 17:24:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193885#M8328</guid>
      <dc:creator>pirx</dc:creator>
      <dc:date>2023-08-09T17:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: OneView and SNMPv1</title>
      <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193953#M8331</link>
      <description>&lt;P&gt;It's very odd.&amp;nbsp; I've never seen any of our OneView appliances enabling SNMPv1.&amp;nbsp; Try running hponcfg and pulling everything out.&amp;nbsp; See what setting you see in the XML output?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 09:41:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7193953#M8331</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-10T09:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: OneView and SNMPv1</title>
      <link>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7194091#M8339</link>
      <description>&lt;P style="margin: 0;"&gt;Hello,&lt;/P&gt;
&lt;P style="margin: 0;"&gt;SNMP will not get enabled automatically, please raise a support case with HPE.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Cheers...&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 04:28:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/oneview-and-snmpv1/m-p/7194091#M8339</guid>
      <dc:creator>MV3</dc:creator>
      <dc:date>2023-08-14T04:28:08Z</dc:date>
    </item>
  </channel>
</rss>

