<?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: ilo snmp traps in ProLiant Servers (ML,DL,SL)</title>
    <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178631#M179909</link>
    <description>&lt;P&gt;All of our servers are Gen10.&amp;nbsp; No gen10plus.&amp;nbsp; I have been extensively reviewing the &lt;A href="https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/" target="_blank" rel="noopener"&gt;Redfish API Reference&lt;/A&gt; , but there is no concrete examples, or paths to accomplish this.&amp;nbsp; I think the steps are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a SNMPv3 user&lt;/LI&gt;&lt;LI&gt;Create a trap destination&lt;/LI&gt;&lt;LI&gt;Create an association between a SNMPv3 user and a destination&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;but there is nothing stating the is the case, nor is there any examples of how to accomplish each.&amp;nbsp; I have step one working.&amp;nbsp; Need to verify my path is correct and how to accomplish steps 2 and 3.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2022 10:05:02 GMT</pubDate>
    <dc:creator>BradV</dc:creator>
    <dc:date>2022-12-02T10:05:02Z</dc:date>
    <item>
      <title>ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178394#M179861</link>
      <description>&lt;P&gt;We have snmp v1 disabled in iLO.&amp;nbsp; Yet when I check in the log of the trap receiver, I see:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Community_infosec_Context = TRAP, SNMP v1, community something&lt;/LI-CODE&gt;&lt;P&gt;I'm trying to get snmp v3 traps to work, but it does not seem to want to.&amp;nbsp; Does anyone know of good documentation on setting up iLO for sending SNMP v3 traps?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 04:23:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178394#M179861</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-09T04:23:33Z</dc:date>
    </item>
    <item>
      <title>Query: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178396#M179863</link>
      <description>&lt;P style="margin: 0;"&gt;&lt;STRONG&gt;System recommended content:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;1. &lt;A href="https://hpe.to/6600M7m24" target="_blank" rel="noopener"&gt;Advisory: HPE Agentless Management Service (AMSD) - SNMP Traps Are Not Sent From the Host to HPE Integrated Lights-Out 5 (iLO 5) Following an iLO Reset&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;2. &lt;A href="https://hpe.to/6601M7m2f" target="_blank" rel="noopener"&gt;Advisory: HP Integrated Lights-Out 3 - iLO 3 May Send SNMP Traps to Random IP Addresses&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Please click on "Thumbs Up/Kudo" icon to give a "Kudo".&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Thank you for being a HPE valuable community member.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 18:33:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178396#M179863</guid>
      <dc:creator>support_s</dc:creator>
      <dc:date>2022-11-28T18:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Query: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178447#M179877</link>
      <description>&lt;P&gt;Neither of those are relevant.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 10:16:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178447#M179877</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-11-29T10:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178453#M179879</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1179670"&gt;@BradV&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please refer to the below video link to find the information regarding enabling SNMP v3..&lt;BR /&gt;&lt;A href="https://support.hpe.com/hpesc/public/videoDisplay?videoId=vtc00000697en_us" target="_blank"&gt;https://support.hpe.com/hpesc/public/videoDisplay?videoId=vtc00000697en_us&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:59:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178453#M179879</guid>
      <dc:creator>prajwal_ds</dc:creator>
      <dc:date>2022-11-29T13:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178455#M179880</link>
      <description>&lt;P&gt;No, sorry.&amp;nbsp; That also is useless.&amp;nbsp; I have hundreds of DL servers.&amp;nbsp; I do not want to point and click on each and every one to set up SNMP v3 trap destinations.&amp;nbsp; I want to do it programmatically via the iLO Redfish API.&amp;nbsp; I have the code to create the SNMP v3 user: &lt;A href="https://community.hpe.com/t5/proliant-servers-ml-dl-sl/create-new-snmp-v3-user-via-redfish-api/td-p/7178162#.Y4YZbn3MKM8" target="_blank" rel="noopener"&gt;Create SNMP v3 User with Redfish API&lt;/A&gt; .&amp;nbsp; I just need to figure out how to add the trap destination.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:39:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178455#M179880</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-11-29T14:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178573#M179898</link>
      <description>&lt;P style="margin: 0;"&gt;Hello,&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Please refer the below guide.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;A href="https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#bios-redfish-changes-gen-10-to-gen-10-plus" target="_blank"&gt;https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#bios-redfish-changes-gen-10-to-gen-10-plus&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 04:48:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178573#M179898</guid>
      <dc:creator>ManBha</dc:creator>
      <dc:date>2022-12-01T04:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178631#M179909</link>
      <description>&lt;P&gt;All of our servers are Gen10.&amp;nbsp; No gen10plus.&amp;nbsp; I have been extensively reviewing the &lt;A href="https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/" target="_blank" rel="noopener"&gt;Redfish API Reference&lt;/A&gt; , but there is no concrete examples, or paths to accomplish this.&amp;nbsp; I think the steps are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a SNMPv3 user&lt;/LI&gt;&lt;LI&gt;Create a trap destination&lt;/LI&gt;&lt;LI&gt;Create an association between a SNMPv3 user and a destination&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;but there is nothing stating the is the case, nor is there any examples of how to accomplish each.&amp;nbsp; I have step one working.&amp;nbsp; Need to verify my path is correct and how to accomplish steps 2 and 3.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 10:05:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178631#M179909</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-02T10:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178775#M179940</link>
      <description>&lt;P style="margin: 0;"&gt;Hello,&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Please do log a case using &lt;A href="https://support.hpe.com/connect/s/?language=en_US" target="_blank"&gt;https://support.hpe.com/connect/s/?language=en_US&lt;/A&gt;.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 16:17:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178775#M179940</guid>
      <dc:creator>ManBha</dc:creator>
      <dc:date>2022-12-05T16:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178815#M179947</link>
      <description>&lt;P&gt;I did, but someone at HPE dispatched it to the local hardware techs.&amp;nbsp; They called me unsure what to do.&amp;nbsp; They said they would return it to the dispatcher.&amp;nbsp; I'm still waiting on it to get assigned.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 08:49:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7178815#M179947</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-06T08:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179001#M179970</link>
      <description>&lt;P&gt;FYI, it finally has been assigned.&amp;nbsp; Working on it.&amp;nbsp; I'll report back what I find.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 09:33:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179001#M179970</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-08T09:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179054#M179979</link>
      <description>&lt;P style="margin: 0;"&gt;Great, thanks for the update Brad.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 04:22:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179054#M179979</guid>
      <dc:creator>ManBha</dc:creator>
      <dc:date>2022-12-09T04:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179470#M180047</link>
      <description>&lt;P&gt;Just FYI, I'm close.&amp;nbsp; I'm getting back&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"MessageId": "Base.1.4.PropertyValueNotInList"&lt;/LI-CODE&gt;&lt;P&gt;So, just need to figure out the correct DATA JSON to send.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 11:02:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179470#M180047</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-15T11:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179591#M180078</link>
      <description>&lt;P&gt;Finally got it worked out.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;1. Get OneView session ID
2. Retrieve list of current SNMP v3 users.  Make sure there is room to add one more.
SERVER=my-fqdn.org
ACTV=$(python -c "import urllib, sys; print urllib.quote(sys.argv[1])"'serverName' = '${SERVER}'\"")
UUID=$(curl --insecure --header "X-API-Version: ${currentVersion}" --header "auth: ${sessionID}" --silent \
   --request GET ${OneView}/rest/server-hardware?filter=${ACTV} | jq -r '.members[] | .uuid'})
read iLOSSO iLOAuth &amp;lt;&amp;lt;&amp;lt; $(curl --silent --insecure --header "X-API-Version: ${currentVersion}" --header "auth: ${sessionID}" \
   --request GET ${OneView}/rest/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 --header "X-Auth-Token: ${iLOAuth}" \
   --request GET ${iLOSSO}/redfish/v1/Managers/1/snmpservice | \
   jq --arg SERVER ${SERVER} '. | .Status as $Status | .Users[] | select(.SecurityName!="") | {"Server": $SERVER, "Status": $Status, "Users": . }' &amp;gt; ./${SERVER}-SNMPv3-Users
if [[ $(grep -c SecurityName ${SERVER}-SNMPv3-Users) -lt 8 ]]; then
   # There is room.  Check to see if this user is already present:
   SECNAME='newuser'
   if [[ $(grep -c '"SecurityName": "'${SECNAME}'"' ${SERVER}-SNMPv3-Users) -eq 0 ]]; then
      echo "Can add another SNMPv3 user to this iLO interface"
      AuthTp='SHA'
      PrivTp='AES'
      AuthP='somepassword'
      PrivP='someotherpassword'
      DATA='{"SecurityName": "'${SECNAME}'","AuthProtocol": "'${AuthTp}'","AuthPassphrase": ";${AuthP}'","PrivacyProtocol": "'${PrivTp}'","PrivacyPassphrase": "'${PrivP}'"}'
      echo ${DATA} | jq -r '.'
      curl --silent --insecure  --header "X-Auth-Token: ${iLOAuth}" --data "${DATA}" --header "content-type: application/json" \
         --request POST ${iLOSSO}/redfish/v1/Managers/1/SnmpService/SNMPUsers/ | jq -r '.'
   else
      echo "${SECNAME} has already been added to this iLO interface"
   fi
else
   echo "No more SNMPv3 users may be added to this iLO interface"
fi
3. Retrieve list of current trap destinations.  Make sure there is room to add one more.
curl --silent --insecure  --header "X-Auth-Token: ${iLOAuth}" --request GET ${iLOSSO}/redfish/v1/Managers/1/SnmpService | \
   jq -r '{"AlertDestinationAssociations":.AlertDestinationAssociations,"AlertsDestinations":.AlertsDestinations,"AlertsEnabled":.AlertsEnabled}' &amp;gt; ./${SERVER}-destinations
if [[ $(grep -vE '\[|\]|null|{|}|SNMPAlertProtocol|SecurityName' ${SERVER}-destinations | wc -l) -lt 8 ]]; then
   # See if the trap destination already exits:
   i=0
   DESTIP='1.2.3.4'
   ArrayEnd=$(jq -r '.AlertDestinationAssociations | length' ${SERVER}-destinations)
   while [[ ${i} &amp;lt; ${ArrayEnd} ]]; do
      if [[ $(echo "$(jq -c ".AlertDestinationAssociations[${i}]" ${SERVER}-destinations)" | grep -c '"SecurityName": "'${SECNAME}'"') -gt 0 ]]; then
         if [[ $(echo "$(jq -c ".AlertDestinations[${i}]" ${SERVER}-destinations)" | grep -c ${DESTIP}) -gt 0 ]]; then
            echo "This user/destination combination already exists on this iLO interface"
            break 3
         fi
      fi
      ((i++))
   done
   # If we reach here, we did not find a match.
   echo "Can add another trap destination to this iLO interface"
   DATA='{"SNMPAlertProtocol":"SNMPv3Trap","SecurityName":"'${SECNAME}'","AlertDestination":"'${DESTIP}'"}'
   curl --silent --insecure --header "X-API-Token: ${iLOAuth}" --header "content-type: application/json" \
      --data "${DATA}" --request PATCH ${iLOSSO}/redfish/v1/Managers/v1/SnmpService/SNMPAlertDestinations | jq -r '.'
else
   ecoh "No more alert destinations may be added to this iLO interface"
fi&lt;/LI-CODE&gt;&lt;P&gt;Hopefully this will be of use to someone else?&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 10:00:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179591#M180078</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-19T10:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179595#M180080</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1179670"&gt;@BradV&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Great!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are glad to know you were able to find the solution and we appreciate you for keeping us updated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 10:22:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179595#M180080</guid>
      <dc:creator>Sunitha_Mod</dc:creator>
      <dc:date>2022-12-19T10:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: ilo snmp traps</title>
      <link>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179598#M180081</link>
      <description>&lt;P&gt;Oops!&amp;nbsp; I had an extra space in the line to check and see if the user/combination already existed:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if [[ $(echo "$(jq -c ".AlertDestinationAssociations[${i}]" ${SERVER}-destinations)" | grep -c '"SecurityName": "'${SECNAME}'"') -gt 0 ]]; then&lt;/LI-CODE&gt;&lt;P&gt;it should be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if [[ $(echo "$(jq -c ".AlertDestinationAssociations[${i}]" ${SERVER}-destinations)" | grep -c '"SecurityName":"'${SECNAME}'"') -gt 0 ]]; then&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 10:47:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/proliant-servers-ml-dl-sl/ilo-snmp-traps/m-p/7179598#M180081</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-19T10:47:40Z</dc:date>
    </item>
  </channel>
</rss>

