GLPI + Metabase plugin

Hi,
I have this situation, but I don’t have idea of problem.

I use GLPI 9.2.4, I installed Metabase v0.33.0 - Built on 2019-08-19.

I installed version 1.0.0 of metabase plugin for GLPI. But i Have this problem:
error: "0 => No auto-generated GLPI database found"

Any suggestion?

Hi @spinal
What are you trying to do?
What is the GLPI plugin supposed to do?
You might get better help from the GLPI community.

HI, I look this plugin on github.

I can look dashboards of my base glpi, if it has support real time is deal for me.

@spinal Okay, I can see that you have already opened an issue on the repo:
https://github.com/pluginsGLPI/metabase/issues/14
Even though it says that the plugin will set the database connection in Metabase, maybe something went wrong.
You should check the Metabase log to see if the plugin is making errors.

Well, I do this.

cat /etc/systemd/system/metabase.service
[Unit]
Description=Metabase server
After=syslog.target
After=network.target

[Service]
User=root
Type=simple
ExecStart=/usr/bin/java -jar /var/metabase.jar
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=metabase

[Install]
WantedBy=multi-user.target

How I can generate logs on mode debug? is this possible to add this logs for /var/log/metabase.log for example?

@spinal I don’t know how this plugin works, but maybe it’s expecting the Metabase application database (also known as metadata) to be in MySQL:
https://metabase.com/docs/latest/operations-guide/configuring-application-database.html
You’re outputting to syslog, so you will have to setup a configuration to store to a specific file or change StandardOutput=file:/var/log/metabase.log

Thanks, I can add metabase on mariadb, but I don’t understand as redirect logs.

but show this errors:

STARTING: Cache field values in mysql Database 2 ‘GLPI’
08-22 16:22:13 ERROR sync.util :: Error updating field values for Field 2,098 ‘serial’: (conn=19956) Incorrect string value: ‘\xC2\x84{\xC3\x83\xC2…’ for column ‘values’ at row 1
(“org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:225)”
“org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:165)”
“org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:238)”
“org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:232)”
“org.mariadb.jdbc.MariaDbPreparedStatementClient.execute(MariaDbPreparedStatementClient.java:159)”
“org.mariadb.jdbc.MariaDbPreparedStatementClient.executeUpdate(MariaDbPreparedStatementClient.java:194)”
“com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:462)”
“clojure.java.jdbc$db_do_execute_prepared_return_keys$exec_and_return_keys__15486.invoke(jdbc.clj:961)”
“clojure.java.jdbc$db_do_execute_prepared_return_keys.invokeStatic(jdbc.clj:989)”
“clojure.java.jdbc$db_do_execute_prepared_return_keys.invoke(jdbc.clj:945)”
“clojure.java.jdbc$db_do_prepared_return_keys.invokeStatic(jdbc.clj:1020)”
“clojure.java.jdbc$db_do_prepared_return_keys.invoke(jdbc.clj:997)”
“clojure.java.jdbc$db_do_prepared_return_keys.invokeStatic(jdbc.clj:1022)”
“clojure.java.jdbc$db_do_prepared_return_keys.invoke(jdbc.clj:997)”
“toucan.db$simple_insert_many_BANG_$iter__18379__18383$fn__18384$fn__18385.invoke(db.clj:551)”
“toucan.db$simple_insert_many_BANG_$iter__18379__18383$fn__18384.invoke(db.clj:549)”
“clojure.lang.LazySeq.sval(LazySeq.java:42)”
“clojure.lang.LazySeq.seq(LazySeq.java:51)”
“clojure.lang.RT.seq(RT.java:535)”
“clojure.core$seq__5402.invokeStatic(core.clj:137)”
“clojure.core$dorun.invokeStatic(core.clj:3133)”
“clojure.core$doall.invokeStatic(core.clj:3148)”
“clojure.core$doall.invoke(core.clj:3148)”
“toucan.db$simple_insert_many_BANG_.invokeStatic(db.clj:548)”
“toucan.db$simple_insert_many_BANG_.invoke(db.clj:534)”
“toucan.db$simple_insert_BANG_.invokeStatic(db.clj:581)”
“toucan.db$simple_insert_BANG_.invoke(db.clj:570)”
“toucan.db$insert_BANG_.invokeStatic(db.clj:598)”
“toucan.db$insert_BANG_.invoke(db.clj:585)”
“toucan.db$insert_BANG_.invokeStatic(db.clj:601)”
“toucan.db$insert_BANG_.doInvoke(db.clj:585)”
“clojure.lang.RestFn.invoke(RestFn.java:573)”
“–> models.field_values$create_or_update_field_values_BANG_.invokeStatic(field_values.clj:135)”
“models.field_values$create_or_update_field_values_BANG_.doInvoke(field_values.clj:92)”
“sync.field_values$fn__49300$update_field_values_for_field_BANG___49305$fn__49306.invoke(field_values.clj:25)”
“sync.field_values$fn__49300$update_field_values_for_field_BANG___49305.invoke(field_values.clj:23)”
“sync.field_values$fn__49326$update_field_values_for_table_BANG___49331$fn__49332$fn__49333$fn__49334.invoke(field_values.clj:46)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:149)”
“sync.util$do_with_error_handling.invoke(util.clj:144)”
“sync.field_values$fn__49326$update_field_values_for_table_BANG___49331$fn__49332$fn__49333.invoke(field_values.clj:44)”
“sync.field_values$fn__49326$update_field_values_for_table_BANG___49331$fn__49332.invoke(field_values.clj:43)”
“sync.field_values$fn__49326$update_field_values_for_table_BANG___49331.invoke(field_values.clj:40)”
“sync.field_values$fn__49353$update_field_values_for_database_BANG___49358$fn__49359.invoke(field_values.clj:54)”
“sync.field_values$fn__49353$update_field_values_for_database_BANG___49358.invoke(field_values.clj:52)”
“sync.util$fn__41313$run_step_with_metadata__41318$fn__41322$fn__41324.invoke(util.clj:356)”
“sync.util$with_start_and_finish_logging_SINGLEQUOTE_.invokeStatic(util.clj:104)”
“sync.util$with_start_and_finish_logging_SINGLEQUOTE_.invoke(util.clj:98)”
“sync.util$with_start_and_finish_debug_logging.invokeStatic(util.clj:121)”
“sync.util$with_start_and_finish_debug_logging.invoke(util.clj:118)”
“sync.util$fn__41313$run_step_with_metadata__41318$fn__41322.invoke(util.clj:353)”
“sync.util$fn__41313$run_step_with_metadata__41318.invoke(util.clj:348)”
“sync.util$fn__41505$run_sync_operation__41510$fn__41511$fn__41512.invoke(util.clj:441)”
“sync.util$fn__41505$run_sync_operation__41510$fn__41511.invoke(util.clj:441)”
“sync.util$fn__41505$run_sync_operation__41510.invoke(util.clj:435)”
“sync.field_values$fn__49379$update_field_values_BANG___49384$fn__49385$fn__49386.invoke(field_values.clj:69)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:149)”
“sync.util$do_with_error_handling.invoke(util.clj:144)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:147)”
“sync.util$do_with_error_handling.invoke(util.clj:144)”
“driver$fn__19275.invokeStatic(driver.clj:671)”
“driver$fn__19275.invoke(driver.clj:671)”
“sync.util$sync_in_context$fn__41219.invoke(util.clj:140)”
“sync.util$with_db_logging_disabled$fn__41216.invoke(util.clj:131)”
“sync.util$with_start_and_finish_logging_SINGLEQUOTE_.invokeStatic(util.clj:104)”
“sync.util$with_start_and_finish_logging_SINGLEQUOTE_.invoke(util.clj:98)”
“sync.util$with_start_and_finish_logging$fn__41205.invoke(util.clj:116)”
“sync.util$with_sync_events$fn__41200.invoke(util.clj:90)”
“sync.util$with_duplicate_ops_prevented$fn__41191.invoke(util.clj:69)”
“sync.util$do_sync_operation.invokeStatic(util.clj:168)”
“sync.util$do_sync_operation.invoke(util.clj:165)”
“sync.field_values$fn__49379$update_field_values_BANG___49384$fn__49385.invoke(field_values.clj:67)”
“sync.field_values$fn__49379$update_field_values_BANG___49384.invoke(field_values.clj:63)”
“sync$fn__51046$sync_database_BANG___51051$fn__51052$fn__51053.invoke(sync.clj:32)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:149)”
“sync.util$do_with_error_handling.invoke(util.clj:144)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:147)”
“sync.util$do_with_error_handling.invoke(util.clj:144)”
“driver$fn__19275.invokeStatic(driver.clj:671)”
“driver$fn__19275.invoke(driver.clj:671)”
“sync.util$sync_in_context$fn__41219.invoke(util.clj:140)”
“sync.util$with_db_logging_disabled$fn__41216.invoke(util.clj:131)”
“sync.util$with_start_and_finish_logging_SINGLEQUOTE_.invokeStatic(util.clj:104)”
“sync.util$with_start_and_finish_logging_SINGLEQUOTE_.invoke(util.clj:98)”
“sync.util$with_start_and_finish_logging$fn__41205.invoke(util.clj:116)”
“sync.util$with_sync_events$fn__41200.invoke(util.clj:90)”
“sync.util$with_duplicate_ops_prevented$fn__41191.invoke(util.clj:69)”
“sync.util$do_sync_operation.invokeStatic(util.clj:168)”
“sync.util$do_sync_operation.invoke(util.clj:165)”
“sync$fn__51046$sync_database_BANG___51051$fn__51052.invoke(sync.clj:26)”
“sync$fn__51046$sync_database_BANG___51051.invoke(sync.clj:19)”
“events.sync_database$process_sync_database_event$fn__67238.invoke(sync_database.clj:36)”)

@spinal
Okay, that’s the problem. Your MariaDB is using a different chartset/collation than utf8mb4. See Question Saving Failed for similar problem.

Thanks.

I want to share my configuration do metabase:

I can’t connect with glpi, but now I use metabase with mariadb, logs and systemd.

cat /etc/systemd/system/metabase.service
[Unit]
Description=Metabase server
After=syslog.target
After=network.target

[Service]
User=root
Type=simple
ExecStart=/var/metabase.sh
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=metabase

[Install]
WantedBy=multi-user.target

Show my script:

cat /var/metabase.sh
#!/bin/bash

export MB_DB_TYPE=mysql MB_DB_PORT=3306 MB_DB_DBNAME=metabase MB_DB_USER=root MB_DB_PASS=passwd MB_DB_HOST=localhost
export MB_DB_CONNECTION_URI="mysql://localhost:3306/metabase?user=root&password=passwd"

java -jar /var/metabase.jar > /var/log/metabase.log 2> /var/log/metabase_error.log

Thank you for your attention.

@spinal
If you are using MB_DB_CONNECTION_URI, then you don’t need the other MB_DB_* variables, besides MB_DB_TYPE=mysql.

ahhh ok.