Getting Started with BeeFlix in 5 minutes

Getting Started with BeeFlix in 5 minutes

You have requested an access to our BeeFlix Saas Platform and want to use it!¬†Good choice ūüėČ

With your free trial account, you can use our cloud platform and configure local agents. The number of databases is unlimited but the data retention is 1 day.

You also have some restrictions in the Optimize and Simulate modules

Once your access is created, you will receive your credentials by e-mail. Then log on to https://core.beeflix.io  and go to the Agents panel to download the agent.

The agent comes with a java runtime (version 8) and is only available for linux for the moment (tar.gz format, 88 MB)

To install and configure it,  copy the tar.gz file to your database server, uncompress it and start it

$ tar xvzf /tmp/beeagent_linux.tar.gz
...
$ export PATH=<<AGENT_HOME>>/bin:$PATH
$ beeflix start agent

Starting the agent ...
The agent is started successfuly

Copyright 2018 (c) BeeFlix- All rights reserved www.beeflix.io
--------------------------------------------------------------
  The agent is up

  Url         : http://my-server:8181
  Version     : 1.0
  Start Date  : 31 Mar 2018 15:41:06

        Token : None

Upload Server : upload.beeflix.io
         Port : 443
       Status : ***KO***

        Proxy : N/A
         Port :
         User :
     Password :

      Running : 0
  Not Running : 0

    Data sent : 0 Bytes

Everything is configurable through its API. By default, you can communicate with the agent or access its user interface through the port 8181.

The username is beeflix, default password : beeflix (recommended to change it ;-))

Example on how to change the agent password through the API:

$ cat <<EOF >/tmp/password.json
{
 "password" : "my-new-password"
}
EOF

$ curl --header "Content-Type: application/json" -X PUT -u beeflix:beeflix http://my-server:8181/api/password -d @/tmp/password.json
{"result":"OK","message":"Password modified sucessfully"}

You can also configure the agent through the CLI

$ beeflix

Copyright (c) 2018 - All rights reserved              www.beeflix.io        
--------------------------------------------------------------------
   Agent:        
        Operations on the agent
         - start agent 
         - stop agent 
         - status agent
        
        Update the agent ui password
         - update password <new password>
   
   Collections:        
        You can enable or disable all collections.   
        When the collections are disabled, the agent is disconnected from the databases.              
         - enable all          
         - disable all
   
   Connection:        
        Operations to manage the connections
         - add db <connection name> -f <json file>         
         - add db <connection name> <json content>
         
         - update db <connection name> -f <json file>         
         - update db <connection name> <json content>
         
         - delete db <connection name> 
         
         - enable db <connection name>         
         - disable db <connection name>           

    To display connection properties :
         - show dbs  
         - show db <connection name>
   
    Upload server:       
        Operations to configure the upload server.
         - update server <host> <port>
         - show server
         - test server

    Token  (Client identifier)
         - update token <token>
         - show token
   
    Proxy:        
        Define Proxy settings.
         - add proxy -f <json file>         
         - add proxy <json content>         
         - delete proxy
         - show proxy

Once started, you need to configure the access token used by the agent to communicate with BeeFlix.

Go to the “Access Token” Panel in the user interface and copy it. Then update the agent.

$ beeflix update token "<<TOKEN>>"
Copyright 2018 (c) BeeFlix- All rights reserved www.beeflix.io
--------------------------------------------------------------
 Token modified sucessfully

If you have a proxy server, update the agent to use it :

Example with curl :

$ cat <<EOF >/tmp/proxy.json
> {
> "host": "my-proxy",
> "port": 9987,
> "user": "proxy-user",
> "password": "proxy-pwd"
> }
> EOF

$ curl --header "Content-Type: application/json" -X POST -u beeflix:my-password http://my-server:8181/api/proxy -d @/tmp/proxy.json

{"result":"OK","message":"The proxy has been successfully added"}

You can then test the connection  between the agent and the BeeFlix server.

$ beeflix test server

Test the upload server...

Copyright 2018 (c) BeeFlix- All rights reserved www.beeflix.io
-------------------------------------------------------------- 
 The upload server is responding correctly!

 

The answer should be OK. If not, you can try to ping the BeeFlix server with curl (in the example, no token was given, but the server is responding correctly)

$ curl -k -X POST https://upload.beeflix.io/write/testUpload
 The authentication token is missing.
 Missing Header : X-token

The agent communicates with our BeeFlix cloud in https (encrypted data) and needs the port 443 to be opened (in case of firewalls)

 

Now, we can configure our first database connection, with the predefined tags.

We can also configure special tags

The agent needs a read only user to access the dictionary.  No functional data is sent, only some technical metrics

 

$ cat <<EOF >/tmp/db.json
> {
> "type": "postgresql",
> "name": "my-postgres",
> "host": "hz-postgresql-10",
> "port": 9342,
> "user_name": "beeflix",
> "password": "beeflix",
> "provider": "AWS",
> "datacenter": "Paris",
> "application": "My-appli",
> "environment": "production",
> "custom_tags": "disk=ssd"
> }
> EOF

$ curl --header "Content-Type: application/json" -X POST -u beeflix:my-new-password http://my-server:8181/api/db/my-postgres -d @/tmp/db.json
{"result":"OK","message":"Db my-postgres sucessfully configured and connected"}

$ beeflix show db my-postgres

Copyright 2018 (c) BeeFlix- All rights reserved www.beeflix.io
-------------------------------------------------------------- 
 Type : postgresql 
 Connection : my-postgres 
 Enabled : true 
 
 Host : my-server 
 Port : 9342 
 Connection type : 
 User : beeflix 
 Password : beeflix 
 
 Agent collection : default 
 
 Provider : AWS 
 Datacenter : Paris 
 Application : My-appli 
 Environment : production 
 Custom tags : disk=ssd 
 
 Data collection : RUNNING 
 Last collection : 02 Apr 2018 18:21:48 
 
 Data sent : 16 KB

The UI shows that the agent is up and running and sends datas from 1 database.

It is recommended to install the agent on each server, but the agent can also be installed on an intermediate server if needed.

 

The APIs allow you to automate database configurations

The agent overhead is minimal as it requires 200MB of disk space and maximum 512 MB of memory. The data sent per day is approximatively 1 MB per database.

And voilà!

You can then use all the modules to control precisely your IT costs.

Enjoy.

As a reminder

BeeFlix is a complete solution of continuous optimization, capacity management, workload analysis of your database resources.

Available for Oracle and PostgreSQL, BeeFlix will be extended to MsSql in the coming months.

Leave a Reply

Your email address will not be published. Required fields are marked *

SUBSCRIBE TO OUR NEWSLETTER

Stay tuned about BeeFlix, its new features, tips, ...