You need to go to WebGUI : SETUP->ADMINISTRATOR. and enable API form there
To get the list of the available commands, you need to connect your Open-E system to an SSH , ssh IP -l api -p 22223 'help'.
You need to go to WebGUI : SETUP->ADMINISTRATOR. and enable API form there
To get the list of the available commands, you need to connect your Open-E system to an SSH , ssh IP -l api -p 22223 'help'.
Thanks. It's helpful for those who haven't used API yet. I have.Originally Posted by Al-S
Ok... I like my Gnome based administration system showing me a status of all my servers. So I 'm using "Output" screenlet to display something like this:
It shows my servers memory usage and refreshes every 5 seconds. How does it work?
First of all I had to enable API (previous post says how).
This API is ssh based. It means that I had to use ssh command to get result from the server.
The first problem is that we don't want to have to log in every time we run command. AND we want our scripts to run it automatically. We can use authentication key which can be downloaded from the same place where we enabled the API.
Help says that an API command can be run this way:
In my case it is:ssh -i path_to_the_downloaded_key -2 -p 22223 -l api ip_address command
I had a problem because of this:ssh -i /home/mavs/MyDSS/TRL00022_20110407152831.key -2 -p 22223 -l api 192.168.253.17 get_memorystatus|head -n4
If you get this, just run:Permissions 0660 for '/home/mavs/MyDSS/TRL00022_20110407152831.key' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
Than I just typed it into the "command to run" field in the screenlet options.chmod 600 filename
And that's it!
Can you achieve more? If yes, than please share![]()
Thank you mavs , your post will help a lot for sure... we are looking to see more comments like that.