Start a Conversation

Unsolved

This post is more than 5 years old

5213

November 7th, 2007 11:00

script on centera

Does anyone have a simple example of script to run on centera?

for example create a file with the outoput of "show pool detail pool_name"

Tks in advanced

25 Posts

December 12th, 2007 23:00

Create a batch file
Create a batch file which calls the Centera Viewer and CLI with the file containing the CLI
commands as a parameter and re-directs output to another text file which will be used to
display the results of the CLI commands.
Example
@echo off
java -cp CenteraViewer.jar com.filepool.remote.cli.CLI -u username -p
password -ip 10.65.133.5:3682 -script script.cli > output.txt

It's documented on Centera online help. You can run any command you run through CLI.

7 Posts

July 27th, 2009 04:00

Hi!

Is there also a way, I could use a PEA file for authentication instead of username and password? If yes - how would an user/profile would have to look like that it could be used to run a script (e.g. to unlock nodes) and login with a PEA file?

-Reto

August 3rd, 2009 23:00

Hi Reto

You can get this to work by creating a profile with monitoring capability AND some data access capabilities (eg read in the default pool).

Then change the connection string to ip:port?path\profile.pea.

With monitoring capability you can issue show commands. If you need any other commands your profile needs to have the rights granted too.

Best regards, Holger

3 Posts

November 9th, 2016 03:00

Hi,

can someone tell me which rights needs a profile  for the only command: show report audit?

January 5th, 2017 22:00

Hi Heidi60

As per the Centera Online Help installed with the Centera Tools, the audit or monitor roles are required to run this command.

Holger

3 Posts

February 27th, 2017 05:00

Hi Holger,

thank for your investigation!

I want to read audit logs with a script. This chat helped to find a solution.

I created a profile with:

Set Data Access Capabilities (yes, no) [no]: no

Set Cluster Management Roles (yes, no) [no]: yes

    Audit role? (yes, no) [no]:yes

But I don't get the question: Establish a Pool Entry Authorization for application use?

Can I create a PEA file whithout pool access? Otherwise I have to write the passwort into the script.

Regards

Heidi

February 27th, 2017 08:00

Hi Heidi

Grant that profile exists capability in the default pool when creating the profile.

Then choose obfuscated to store the password in the Centera.

Then issue the command and the question about the pea should come up.

create the pea file

then issue a set grants default profile to remove the exists capability

Hope this helps.

If not, drop me an email to holger.jakob@informatio.com and we'll schedule a remote session.


Holger

3 Posts

March 9th, 2017 02:00

java -cp "$BDIR/bin/CenteraViewer.jar" com.filepool.remote.cli.CLI -ip $IPADR:3682?${BDIR}/etc/rs_monitor.pea -script  $CLISRCHi Holger,

with granting Data Access Capabilities in default pool I was successful in creating the pea file.

But i get this error with pea file usage

                       No valid password retriever found!

My command is:

java -cp "$BDIR/bin/CenteraViewer.jar" com.filepool.remote.cli.CLI -ip $IPADR:3682?${BDIR}/etc/rs_monitor.pea -script  $CLISRC


What is wrong? it works with password.


Best Regards

Heidi

March 20th, 2018 14:00

Did you manage to figure this out?  I am getting the same error when referencing the pea file and cannot work out what to do next

No Events found!

Top