- Community Home
- >
- Software
- >
- HPE OneView
- >
- Finding the reason for profile non-compliance
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
a week ago
Finding the reason for profile non-compliance
We have several hundred profiles which show in OneView being non-compliant with iLO settings. Trying to re-apply through the gui is just a lot of clicking and would take quite a while. I can extract all of the profiles using the REST API and store in a file with variable PROF pointing to it.
I can find the non-compliant profiles with:
jq -r '.members[] | select(.templateCompliance=="NonCompliant")' ${PROF}
however in the output, I can't identify the reason each profile is non-compliant.
I'm getting the profiles with:
curl --insecure --silent \
--header "X-API0Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--output ${PROFN} \
--request GET ${OneView}/rest/server-profiles
#
# And then looping through using nextPageUri until nextPageUri is null.
Anyone have an idea how I determine if the non-compliance is due to iLO settings?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Monday
Re: Finding the reason for profile non-compliance
Anyone from HPE know how to determine the source of the alert? Trying to identify the ones non-compliant due to iLO settings. Here is the complete code of how I download the alerts:
# We have multiple sites. So, I set a site variable so that I can run the same commands
# simultaneously in multiple terminals.
SITE='<site name>'
ALERTN=alert-${SITE}
ACTV=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "\"alertState EQ 'Active'\"")
curl --insecure \
--header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--output ${ALERTN} \
--request GET ${OneView}/rest/alerts?start=0&count=-1&filter=${ACTV}
#
# That only pulls down 25 alerts. Pull down the rest with:
i=1
NEXT=$(jq -r '.nextPageUri' ${ALERTN} | sed -e "s|\(.*filter=\).*|\1${ACTV}|")
while [[ ${NEXT} != *"null"* ]]; do
curl --insecure \
--header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--output ${ALERTN}${i} \
--request GET ${OneView}${NEXT}
NEXT=$(jq -r '.nextPageUri' ${ALERTN}${i} | sed -e "s|\(.*filter=\).*|\1${ACTV}|")
((i++))
done
# Concantenate into a single file.
j=0
while [[ ${j} -t ${i} ]]; do
echo ${j}
if [[ ${j} -eq 0 ]]; then
CMD="cat ${ALERTN}"
else
CMD="${CMD} ${ALERTN}${j}"
fi
((j++))
done
$(echo ${CMD} > alert-all-raw-${SITE})
cat alert-all-raw-${SITE} | jq -r '.' > alert-${SITE}-all
ALERTS=alert-${SITE}-all
/bin/rm alert-${SITE} alert-${SITE}? alert-${SITE}[1-9]? alert-all-raw-${SITE}