But with this certificate I still need to provide a password for every curl command.
I was thinking more about some automation user which uses something like a keyfile without password.
Is this somehow possible? Otherwise I will write an expect script I can provide the PW and run it with curl -user USER:PW ...
Then it is a least not in the shell history.
Original Message:
Sent: Fri June 03, 2022 09:46 AM
From: Tim Hill
Subject: Hide all events all endpoints
Hi Stefan,
A certificate-based approach (to avoid the username/password stuff) might look something like:
# openssl s_client -connect "${HOSTNAME}:${PORT}" </dev/null > "servercert.out.tmp"
The hostname and port are where PSC is running
# cat "servercert.out.tmp" | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > "servercert.crt"
# rm "servercert.out.tmp"
To strip off extraneous stuff and get just the cert content in a file
then use
# curl --cacert=servercert.crt… ....
It's not completely secure because you're still self-validating the cert…but it's better than entering passwords.
Tim
------------------------------
Tim Hill
Original Message:
Sent: Wed June 01, 2022 11:36 AM
From: Stefan Koller
Subject: Hide all events all endpoints
Hi Tim
Thanks a lot - The commands work.
I managed also to create a script to generate all command for all VMs.
But of course I would have to enter my password for each instance.
Do you have an idea how to solve that? maybe with a keyfile (if possible)? To place clear text a password into a script is not very nice.
Or is it possible to create a user with very restricted permissions?
You offered to write a script for us - this would be very nice.
The ultimate solution would be having a "clear events on all VMs" button in the GUI. :-)
Thanks a lot
Stefan
------------------------------
Stefan Koller
Original Message:
Sent: Tue May 31, 2022 12:41 PM
From: Tim Hill
Subject: Hide all events all endpoints
Hi,
There's currently no way through the UI to hide all events on all endpoints with a single click. However, you can accomplish this via the REST API; for example using curl in a shell script. Here's a command to hide all events for a single endpoint:
# curl --user thill --insecure -X 'POST' \
'https://129.40.40.86/ws/powerscui/blackboard?elementId=p52n73.pbm.ihost.com&hide=true' \
-H 'accept: application/json'
In the above:
- The thill value for user should obviously be changed to a valid user on your PowerSC server system. You'll be prompted for pw.
- The 129.40.40.86 is the PowerSC server
- elementId refers to the endpoint for which you want to hide events
- The above command will Hide all events for that one server
To do the same thing for ALL servers you'll need to set up a shell script that first collects all the endpoints, then loop thru them. That can be done with the following call:
curl –-user thill –-insecure -X 'GET' \
'https://129.40.40.86/ws/powerscui/systems' \
-H 'accept: application/json'
- Again, changing thill to be your username and changing 129.40.40.86 to be your PowerSC server.
- It returns a big json structure for each endpoint, but you can grab the bestName value and use it with the previous Hide command for each endpoint.
We can write something for you that does all this in one script, but we don't currently have it and might take a while for us to get to it. But wanted you to see that you can use those REST API commands to accomplish hiding all events on all endpoints.
Tim
------------------------------
Tim Hill
Original Message:
Sent: Wed May 18, 2022 03:41 AM
From: Stefan Koller
Subject: Hide all events all endpoints
Hello
We are using PowerSC 2.0.0.2.
Is it possible to execute "Hide all Events" on all Endpoints in PowerSC GUI or maybe at commandline?
If LPARs get rebooted a "Agent Connectivity" Alert is raised. And during patching sometime also some alerts are raised.
After a patchday I don't want to hide all events on 100+ endpoints.
In the reports tab you also can only show on endpoint at a time and would have to hide it per endpoint.
Thanks
------------------------------
Stefan Koller
------------------------------