Skip to content
Snippets Groups Projects
Commit de8a941f authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Merge branch 'master' of https://github.com/metabase/metabase into release-0.24.2

parents b859d402 63c68f40
No related branches found
No related tags found
No related merge requests found
Showing
with 391 additions and 19 deletions
......@@ -8,17 +8,15 @@ Metabase is the easy, open source way for everyone in your company to ask questi
[![Circle CI](https://circleci.com/gh/metabase/metabase.svg?style=svg&circle-token=3ccf0aa841028af027f2ac9e8df17ce603e90ef9)](https://circleci.com/gh/metabase/metabase)
[![Leiningen Dependencies Status](https://jarkeeper.com/metabase/metabase/status.svg)](https://jarkeeper.com/metabase/metabase)
[![NPM Dependencies Status](https://david-dm.org/metabase/metabase.svg)](https://david-dm.org/metabase/metabase)
[![Issue Stats](http://issuestats.com/github/metabase/metabase/badge/pr)](http://issuestats.com/github/metabase/metabase)
[![Issue Stats](http://issuestats.com/github/metabase/metabase/badge/issue)](http://issuestats.com/github/metabase/metabase)
# Features
- 5 minute [setup](http://www.metabase.com/docs/latest/setting-up-metabase) (We're not kidding)
- Let anyone on your team [ask questions](http://www.metabase.com/docs/latest/users-guide/03-asking-questions) without knowing SQL
- Rich beautiful [dashboards](http://www.metabase.com/docs/latest/users-guide/05-sharing-answers) with auto refresh and fullscreen
- Let anyone on your team [ask questions](http://www.metabase.com/docs/latest/users-guide/04-asking-questions) without knowing SQL
- Rich beautiful [dashboards](http://www.metabase.com/docs/latest/users-guide/06-sharing-answers) with auto refresh and fullscreen
- SQL Mode for analysts and data pros
- Create canonical [segments and metrics](http://www.metabase.com/docs/latest/administration-guide/07-segments-and-metrics) for your team to use
- Send data to Slack or email on a schedule with [Pulses](http://www.metabase.com/docs/latest/users-guide/09-pulses)
- View data in Slack anytime with [MetaBot](http://www.metabase.com/docs/latest/users-guide/10-metabot)
- Send data to Slack or email on a schedule with [Pulses](http://www.metabase.com/docs/latest/users-guide/10-pulses)
- View data in Slack anytime with [MetaBot](http://www.metabase.com/docs/latest/users-guide/11-metabot)
- [Humanize data](http://www.metabase.com/docs/latest/administration-guide/03-metadata-editing) for your team by renaming, annotating and hiding fields
For more information check out [metabase.com](http://www.metabase.com)
......
......@@ -22,7 +22,6 @@ container_commands:
02_server_https:
command: ".ebextensions/metabase_config/metabase-setup.sh server_https"
test: test $NGINX_FORCE_SSL
ignoreErrors: true
03_log_x_real_ip:
......
......@@ -49,8 +49,95 @@ server_name () {
# enable https redirect
server_https () {
cd /etc/nginx/sites-available/
if [[ "$NGINX_FORCE_SSL" ]] && ! grep -q https elasticbeanstalk-nginx-docker-proxy.conf ; then
sed -i 's|location \/ {|location \/ {\n\n if ($http_x_forwarded_proto != "https") {\n rewrite ^ https:\/\/$host$request_uri? permanent;\n }\n|' elasticbeanstalk-nginx-docker-proxy.conf
if [[ "x$NGINX_FORCE_SSL" == "x1" ]] # && ! grep -q https elasticbeanstalk-nginx-docker-proxy.conf ;
then
cat << 'EOF' > elasticbeanstalk-nginx-docker-proxy.conf
map $http_upgrade $connection_upgrade {
default "upgrade";
"" "";
}
server {
listen 80;
gzip on;
gzip_comp_level 4;
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") {
set $year $1;
set $month $2;
set $day $3;
set $hour $4;
}
access_log /var/log/nginx/healthd/application.log.$year-$month-$day-$hour healthd;
access_log /var/log/nginx/access.log;
location /api/health {
proxy_pass http://docker;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
if ($http_x_forwarded_proto != "https") {
rewrite ^ https://$host$request_uri? permanent;
}
proxy_pass http://docker;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
EOF
else
cat << 'EOF' > elasticbeanstalk-nginx-docker-proxy.conf
map $http_upgrade $connection_upgrade {
default "upgrade";
"" "";
}
server {
listen 80;
gzip on;
gzip_comp_level 4;
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") {
set $year $1;
set $month $2;
set $day $3;
set $hour $4;
}
access_log /var/log/nginx/healthd/application.log.$year-$month-$day-$hour healthd;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://docker;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
EOF
fi
}
......
......@@ -187,8 +187,10 @@ sub create_dmg_from_source_dir {
'-fs', 'HFS+',
'-fsargs', '-c c=64,a=16,e=16',
'-format', 'UDRW',
'-size', '256MB', # it looks like this can be whatever size we want; compression slims it down
'-size', '512MB', # has to be big enough to hold everything uncompressed, but doesn't matter if there's extra space -- compression slims it down
$dmg_filename) == 0 or die $!;
announce "$dmg_filename created.";
}
# Mount the disk image, return the device name
......
#!/usr/bin/env bash
VERSION="v0.24.2"
VERSION="v0.25.0-snapshot"
# dynamically pull more interesting stuff from latest git commit
HASH=$(git show-ref --head --hash=7 head) # first 7 letters of hash should be enough; that's what GitHub uses
......
## In-depth Guides
#### [Troubleshooting Guide](troubleshooting-guide/index.md)
Have a problem and need help? Start with our troubleshooting guide.
#### [Users Guide](users-guide/start.md)
This is the go-to guide on asking questions and sharing answers using Metabase. You'll learn in depth about how questions are expressed, how to chart answers, as well as how to share questions and create dashboards.
......
......@@ -18,10 +18,12 @@ Now you’ll see a list of your databases. To connect another database to Metaba
* Postgres
* SQLite
* SQL Server
* Driud
* Druid
* [CrateDB](databases/cratedb.md)
* [Oracle](databases/oracle.md)
* [Vertica](databases/vertica.md)
* Presto
* Google Analytics
To add a database, you'll need its connection information.
......
......@@ -20,9 +20,9 @@ You’ll notice that you already have two default groups: Administrators and All
You’ll also see that you’re a member of the **Administrators** group — that’s why you were able to go to the Admin Panel in the first place. So, to make someone an admin of Metabase you just need to add them to this group. Metabase admins can log into the Admin Panel and make changes there, and they always have unrestricted access to all data that you have in your Metabase instance. So be careful who you add to the Administrator group!
The **All Users** group is another special one. Every Metabase user is always a member of this group, though they can also be a member of as many other groups as you want. We recommend using the All Users group as a way to set default access levels for new Metabase users. If you have [Google single sign-on](09-single-sign-on.md) enabled, new users who join that way will be automatically added to the All Users group. (**Important note:** as we mentioned above, a user is given the *most permissive* setting she has for a given database/schema/table across *all* groups she is in. Because of that, it is important that your All Users group should never have *greater* access for an item than a group for which you're trying to restrict access — otherwise the more permissive setting will win out.)
The **All Users** group is another special one. Every Metabase user is always a member of this group, though they can also be a member of as many other groups as you want. We recommend using the All Users group as a way to set default access levels for new Metabase users. If you have [Google single sign-on](10-single-sign-on.md) enabled, new users who join that way will be automatically added to the All Users group. (**Important note:** as we mentioned above, a user is given the *most permissive* setting she has for a given database/schema/table across *all* groups she is in. Because of that, it is important that your All Users group should never have *greater* access for an item than a group for which you're trying to restrict access — otherwise the more permissive setting will win out.)
If you’ve set up the [Slack integration](08-setting-up-slack.md) and enabled [Metabot](../users-guide/10-metabot.md), you’ll also see a special **Metabot** group, which will allow you to restrict which questions your users will be able to access in Slack via Metabot.
If you’ve set up the [Slack integration](09-setting-up-slack.md) and enabled [Metabot](../users-guide/11-metabot.md), you’ll also see a special **Metabot** group, which will allow you to restrict which questions your users will be able to access in Slack via Metabot.
#### Managing groups
......
......@@ -3,7 +3,7 @@
Collections are a great way to organize your saved questions and decide who gets to see and edit things. Collections could be things like, "Important Metrics," "Marketing KPIs," or "Questions about users." Multiple [user groups](05-setting-permissions.md) can be given access to the same collections, so we don't necessarily recommend naming collections after user groups.
This page will teach you how to create and manage your collections. For more information on organizing saved questions and using collections, [check out this section of the User's Guide](../users-guide/05-sharing-answers.md).
This page will teach you how to create and manage your collections. For more information on organizing saved questions and using collections, [check out this section of the User's Guide](../users-guide/06-sharing-answers.md).
### Creating and editing collections
Only administrators of Metabase can create and edit collections. From the Questions section of Metabase, click on the `Create a collection` button. Give your collection a name, choose a color for it, and give it a description if you'd like.
......
......@@ -10,7 +10,7 @@ Before you've even created your guide, this page gives you some links that you c
![Sections](images/gsg/sections.png)
You can highlight your company's most important dashboard, [metrics](06-segments-and-metrics.md) that you commonly refer to (and the dimensions by which they're most often grouped), and tables and [segments](06-segments-and-metrics.md) that are useful or interesting. There's also a place to write a little bit more about "gotchas" or caveats with your data that your users should know about before they start exploring things and drawing conclusions. Lastly, you can optionally include an email address for your users to contact in case they're still confused about things.
You can highlight your company's most important dashboard, [metrics](07-segments-and-metrics.md) that you commonly refer to (and the dimensions by which they're most often grouped), and tables and [segments](07-segments-and-metrics.md) that are useful or interesting. There's also a place to write a little bit more about "gotchas" or caveats with your data that your users should know about before they start exploring things and drawing conclusions. Lastly, you can optionally include an email address for your users to contact in case they're still confused about things.
If you click on a section, it'll expand and let you select the items that you want to include in that section:
......
......@@ -45,6 +45,7 @@ Metabase currently supports:
* MongoDB (version 3.0 or higher)
* MySQL (and MariaDB)
* PostgreSQL
* Presto
* SQL Server
* SQLite
......@@ -58,9 +59,9 @@ We welcome community contributions of database connectors. If you're able to hel
### Can Metabase connect to Google Analytics, Salesforce, etc.?
No. Metabase is a fast and easy way for you to access and share information you have in a database. We do not currently offer a way to connect to third-party APIs or services directly. What people do instead in these situations is download data from these services into a database they control and then use Metabase to access that database directly. This can be done either by writing code or more commonly using a third-party service. There are a large number of these services, and you can ask other users and discuss pros and cons at our [user forum](https://discourse.metabase.com).
Metabase currently supports Google Analytics as a data source. The connection can be set up by an admin the same way database connections are set. If you are using Google Analytics Premium, one of the features is direct access to a BigQuery database with your personal Google Analytics data. BigQuery is also supported by Metabase.
One caveat is that if you are using Google Analytics Premium, one of the features is direct access to a BigQuery database with your personal Google Analytics data. In this situation, you can use Metabase with that BigQuery dataset directly.
We do not currently offer a way to connect to other third-party APIs or services directly. What people do instead in these situations is download data from these services into a database they control and then use Metabase to access that database directly. This can be done either by writing code or more commonly using a third-party service. There are a large number of these services, and you can ask other users and discuss pros and cons at our [user forum](https://discourse.metabase.com).
### Can I upload data to Metabase?
......@@ -80,4 +81,5 @@ We are experimenting with offering paid support to a limited number of companies
### Can I embed charts or dashboards in another application?
Not yet. We're working on it however, and you should expect it in the near future. (Late summer/early fall 2016). Keep tabs on it at the main [tracking issue](https://github.com/metabase/metabase/issues/1380)
Yes, Metabase offers two solutions for sharing charts and dashboards.
[Public links](http://www.metabase.com/docs/latest/administration-guide/12-public-links.html) let you share or embed charts with simplicity. A powerful [application embedding](http://www.metabase.com/docs/latest/administration-guide/13-embedding.html) let you to embed and customize charts in your own web applications.
......@@ -56,6 +56,11 @@ cd metabase-deploy
git remote add heroku https://git.heroku.com/your-metabase-app.git
```
* If you are upgrading from a version that is lower than 0.25, add the Metabase buildpack to your Heroku app:
```
heroku buildpacks:add https://github.com/metabase/metabase-heroku
```
* Force push the new version to Heroku:
```bash
......
If you come across something that looks like a bug, we suggest collecting the following information to help us reproduce the issue.
1. Server logs
2. Javascript console logs
3. Can it be reproduced on the sample dataset?
4. Your Metabase version
5. Where Metabase is running (Docker image, AWS Elastic Beanstalk, etc)
6. What browser version
## Helpful tidbits
### Accessing the Metabase server logs
While you can always look for the logs Metabase leaves on your server file system (or however you collect logs), if you are logged into Metabase with an admin account, you can also access them from the drop down menu in the upper right hand corner.
![Logs Screenshot](images/ServerLogs.png)
### Checking for Javascript errors in Chrome
Metabase will print debugging information and errors to your browsers Javascript Console.
You can open the javascript console in Chrome by following the instructions at
https://developers.google.com/web/tools/chrome-devtools/console/
### Checking for Javascript errors in Firefox
Metabase will print debugging information and errors to your browsers Javascript Console.
You can open the javascript console in Mozilla by following the instructions at
https://developer.mozilla.org/en-US/docs/Tools/Web_Console
### Checking for Javascript errors in Safari
Metabase will print debugging information and errors to your browsers Javascript Console.
You can open the javascript console in Safari by following the instructions at
https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html
### Checking for Javascript errors in Internet Explorer
Metabase will print debugging information and errors to your browsers Javascript Console.
You can open the javascript console in Internet Explorer by following the instructions at
https://msdn.microsoft.com/en-us/library/gg589530(v=vs.85).aspx
For many versions this can also be accessed by pressing the F12 key on your keyboard.
\ No newline at end of file
## Troubleshooting Process
1. Verify that the data warehouse server is running
2. Try connecting to the data warehouse using another client from a machine you know should have access
3. Try connecting to the data warehouse from another client from the machine you're running Metabase on
4. Add the connection in Metabase
5. Examine the logs to verify that the sync process started and that no errors were thrown
6. Run a native "SELECT 1" query to verify the connection to the data warehouse
7. If the sync process has completed, attempt to do a "Raw data" query to verify that you are able to use the database
## Specific Problems:
### The Data Warehouse Server is not running:
#### How to detect this -
As silly as this sounds, occasionally database servers go down.
If you are using a hosted database service, go to it's console and verify that its status is Green. If you have direct access to a command line interface, log in and make sure that it is up and running and accepting queries.
#### How to fix this -
It's out of the scope of this troubleshooting guide to get your data warehouse server back up. Check with whoever set it up for you!
### The Data Warehouse Server is not accepting connections from your IP:
#### How to detect this -
If you are able to access the server from a bastion host, or another machine, use `nc` on linux (or your operating systems equivalent) to verify that you can connect to the host on a given port.
The port a data warehouse server software is attached to varies, but an example for a default PostgreSQL configuration (which listens on port 5432) would be
`nc -v your-db-host 5432`
#### How to fix this -
It's out of the scope of this troubleshooting guide to change your network configuration. Talk to whoever is responsible for the network your data warehouse is running on.
### Incorrect credentials
#### How to detect this -
If you've verified that you can connect to the host and port on the data warehouse, the next step is to check your credentials.
Again, connecting to a data warehouse depends on your database server software, but for PostgreSQL, the below uses a command line interface (`psql`) to connect to your data warehouse.
`psql -h HOSTNAME -p PORT -d DATABASENAME -U DATABASEUSER`
If your credentials are incorrect, you should see an error message letting you know if the database name or the user/password are incorrect.
#### How to fix this -
If the database name or the user/pass combination are incorrect, ask the person running your data warehouse for correct credentials.
\ No newline at end of file
While Docker simplifies a lot of aspects of running Metabase, there are a number of potential pitfalls to be keep in mind.
If you are having issues with Metabase under Docker, we recommend going through the troubleshooting process below. Then look below for the details about the specific issue you've found.
## Troubleshooting Process
1. Check that the container is running
2. Check that the server is running inside the container
3. Check whether Metabase is using the correct application database
4. Check that you can connect to the Docker host on the Metabase port
5. Check that you can connect to the container from the Docker host
6. Check that you can connect to the server from within the container
## Specific Problems:
### Metabase container exits without starting the server
Run `docker ps` to see if the metabase container is currently running. If it is move on to the next step.
If `docker ps` does not show the running container, then list the stopped containers by running
`docker ps -a | grep metabase/metabase`
And look for the container that exited most recently. Note the container id.
Look at that containers logs with
`Docker logs CONTAINER_ID`
### Metabase Container is running but the Server is not
#### How to detect this -
Run `docker ps` to make sure the container is running
The server should be logging to the docker container logs. Check this by running
`docker logs CONTAINER_NAME`
You should see a line like at the beginning
```
05-10 18:11:32 INFO metabase.util :: Loading Metabase...
```
and eventually
```
05-10 18:12:30 INFO metabase.core :: Metabase Initialization COMPLETE
```
If you see log lines from Metabase like the below
If you see the below lines:
```
05-15 19:07:11 INFO metabase.core :: Metabase Shutting Down ...
05-15 19:07:11 INFO metabase.core :: Metabase Shutdown COMPLETE
```
#### How to fix this -
Check this for errors about connecting to the application database.
Watch the logs to see if metabase is still being started:
`Docker logs -f CONTAINER_ID`
Will let you see the logs as they are printed.
If the container is being killed before it finished starting it could be a health check timeout in the orchestration service used to start the container, such as docker cloud, or elastic beanstalk.
If the container is not being killed from the outside, and is failing to start anyway, this problem is probably not specific to Docker. If you are using a Metabase supplied image, you should open a github issue at github.com/metabase/metabase/issues/new
### Not connecting to a remote application database
#### How to detect this
If this is a new Metabase instance, then the database you specified via the environment variables will be empty.
If this is an existing Metabase instance with incorrect environment parameters, the server will create a new H2 embedded database to use for application data and you’ll lines similar to the below.
```
05-10 18:11:40 INFO metabase.core :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute...
05-10 18:11:40 INFO metabase.db :: Verifying h2 Database Connection ...
05-10 18:11:40 INFO metabase.db :: Verify Database Connection ... ✅
```
#### How to fix this -
Double check you are passing environments to docker in the correct way.
You can list the environment variables for a container with this command:
`docker inspect some-postgres -f '{{ .Config.Env }}'`
### The Metabase server isn’t able to connect to a MySQL or PostgreSQL
#### How to detect this -
The logs for the docker container return an error message after the “Verifying Database Connection” line.
#### How to fix this -
Try to connect with “mysql” or “psql” commands with the connection string parameters you are passing in via the environment variables http://www.metabase.com/docs/latest/operations-guide/start.html#configuring-the-metabase-application-database .
If you can’t connect to the database, the problem is due to either the credentials or connectivity. Verify that the credentials are correct. If you are able to log in with those credentials from another machine then try to make the same connection from the host running the docker container.
One easy way to run this is to use docker to start a container that has the appropriate client for your database. For postgres this would look like:
`docker run --name postgres-client --rm -ti --entrypoint /bin/bash postgres`
Then from within that container try connecting to the database host using the client command in the container such as `psql`
If you are able to connect from another container on the same host, then try making that connection from within the metabase docker container itself.
`docker exec -ti container-name bash`
And try to connect to the database host using the `nc` command and check if the connection can be opened.
`nc -v your-db-host 5432`
This will make it clear if this is a network or authentication problem.
### The Metabase application database is not being persisted
#### How to detect this -
This occurs if you get the Setup screen every time you start the application. The most common root cause is not giving the docker container a persistent filesystem mount to put the application database in.
#### How to fix this -
Make sure you are giving the container a persistent volume as per http://www.metabase.com/docs/latest/operations-guide/running-metabase-on-docker.html#mounting-a-mapped-file-storage-volume
### The internal port isn’t being remapped correctly
#### How to detect this -
Run `docker ps` and look at the port mapping
Run `curl http://localhost:port-number-here/api/health`. This should return a response with a json reponse like
```
{"status":"ok"}
```
#### How to fix this -
Make sure you include a `-p 3000:3000` or similar remapping in the `docker run` command you execute to start the Metabase container image.
## Helpful tidbits
### How to get to the shell in the Metabase container
`docker exec -ti CONTAINER_NAME bash`
### How to get the logs for the Metabase container
`docker logs -f CONTAINER_NAME`
## Troubleshooting Process
1.
## Specific Problems:
### Specific Problem:
### Metabase can't send email via Office365
We see users report issues with sending email via Office365. We recommend using a different email delivery service if you can.
https://github.com/metabase/metabase/issues/4272
\ No newline at end of file
docs/troubleshooting-guide/images/ServerLogs.png

15.6 KiB

## What are you having trouble with?
### [Logging in?](loggingin.md)
### [Running Metabase on Docker?](docker.md)
### [Connecting to databases and data warehouses with Metabase?](datawarehouse.md)
### [Incorrect results due to Timezones](timezones.md)
### [I think I found a bug?](bugs.md)
\ No newline at end of file
## Troubleshooting Process
1.
## Specific Problems:
### Specific Problem:
xxx
#### How to detect this -
xxx
#### How to fix this -
xxx
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment