- Community Home
- >
- Storage
- >
- Midrange and Enterprise Storage
- >
- HPE 3PAR StoreServ Storage
- >
- query added to eventlog does not work
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
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
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
04-12-2022 05:28 AM
04-12-2022 05:28 AM
Re: query added to eventlog does not work
Hi BradV
Yes, it is working in plain curl. (Also the port number 443 is for https and those examples are from the Primera. 3par it is 8080 only (Basically you might not need to give the port number also).
And, it seems the issue is with the http/jason client. It needs the ASCII values instead of blank space, " etc.
Could you try the same?
curl -s --insecure --header "X-HP3PAR-WSAPI-SessionKey: <key>" <Array>api/v1/eventlog/minutes:1000?query=%22severity%20EQ%206%22 | jq -r '.'
%22 is for "
%20 is for SPACE
Regards,
Veeyarvi
I am an HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 01:46 AM
04-13-2022 01:46 AM
Re: query added to eventlog does not work
Well, that gives:
{
"code": 148,
"desc": "Invalid Query String"
}
I also tried changing the '%22' back to ", but that also gave back code 148.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 01:49 AM
04-13-2022 01:49 AM
Re: query added to eventlog does not work
Hi BradV,
Could you share the complete query and the output?
Regards,
Veeyarvi
I am an HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 02:09 AM - edited 04-20-2022 02:11 AM
04-20-2022 02:09 AM - edited 04-20-2022 02:11 AM
SolutionSure.
USERN=myid
PASSW='mypassword'
STORSRV='my-storserv.com'
sessionID=$(curl --insecure --header "content-type: application/json" \
--header "accept: applicatoin/json" \
--data '{"user":"'"${USERN}"'","password":"'"${PASSW}"'","sessionType":1}' \
--request PSOT https://${STORSRV}:8080/api/v1/credentials | jq -r '.key')
echo ${sessionID}
curl --silent --insecure --header "X-HP3PAR-WSAPI-SessionKey: ${sessionID}" https://${STORSRV}:8080/api/v1/eventlog/minutes:1000?%22category%20EQ%201%22 | jq -r '.'
and get output:
{
"code": 148,
"desc": "Invalid Query String"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 05:42 AM
04-20-2022 05:42 AM
Re: query added to eventlog does not work
I missed a "query'" in that string. Modifying to:
curl --silent --insecure --header "X-HP3PAR-WSAPI-SessionKey: ${sessionID}" https://${STORSRV}:8080/api/v1/eventlog/minutes:1000?query=%22category%20EQ%201%22 | jq -r '.'
gets me back the correct values.
Could you please make sure they update the documentation to reflect this required character substition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 12:28 AM
05-03-2022 12:28 AM
Re: query added to eventlog does not work
Hi BradV,
Nice to see it worked.
As mentioned before, the syntax given in the guide are for plain curl and they work. And when we use the http/json client need to enclode the url in ASCII format.
Regards,
Veeyarvi
I am an HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 04:47 AM - last edited on 08-23-2023 09:11 AM by Parvez_Admin
05-11-2022 04:47 AM - last edited on 08-23-2023 09:11 AM by Parvez_Admin
Re: query added to eventlog does not work
Hi BradV,
Just to add, we can use the switch '--data-urlencode' with the clients and thus avoid providing the ASCII values.
e.g.
curl -G -k -H 'Content-Type: application/json' -H 'Content-Type: application/json' -H "X-HP3PAR-WSAPI-Sessionkey:${key}" -X GET --data-urlencode 'query="severity EQ 6"'
I am an HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- « Previous
-
- 1
- 2
- Next »