[Support] uberchuckie - observium


Recommended Posts

  • 2 months later...
On 9/22/2019 at 10:00 AM, ultimz said:

Thanks uberchuckie - I'll wait for a stable version of 6.7.3 to be released and then will hopefully be able to upgrade to the new version of Observium 

I tried both unRAID 6.8.0-rc9 and 6.8.0. The latest image works fine so I've push the beta tag to be the latest tag as well. I've been using the image since September and had not run into any issues.

Link to comment
6 hours ago, Silvan-0172 said:

Have you ever got it fixed ? i tried loads of stuff and the graphs are still an hour off sadly.

I took a look at this...

 

I ran /opt/observium/poller.php -d and saw this:

#####  Timezones info  #####

 o Date                 Tuesday, 10-Dec-19 21:08:21 EST
 o PHP                  -05:00
 o MySQL                -05:00

 

This looks like it's correct and PHP and MySQL have matching time offset.

root@c3b53bf2ea0d:/opt/observium# mysql -u observium -p observium
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.4.8-MariaDB-1:10.4.8+maria~bionic-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [observium]> select now();
+---------------------+
| now()               |
+---------------------+
| 2019-12-10 21:11:56 |
+---------------------+
1 row in set (0.000 sec)

MariaDB [observium]>

 

This is also showing the correct time.

 

I even tried adding "default-time-zone='-05:00'" to "/etc/mysql/my.cnf" and restarting the database and that didn't make any difference. The graphs are still in UTC.

 

I'm not sure what's the problem at this point.

Edited by uberchuckie
Link to comment
4 hours ago, uberchuckie said:

I took a look at this...

 

I ran /opt/observium/poller.php -d and saw this:


#####  Timezones info  #####

 o Date                 Tuesday, 10-Dec-19 21:08:21 EST
 o PHP                  -05:00
 o MySQL                -05:00

 

This looks like it's correct and PHP and MySQL have matching time offset.


root@c3b53bf2ea0d:/opt/observium# mysql -u observium -p observium
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.4.8-MariaDB-1:10.4.8+maria~bionic-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [observium]> select now();
+---------------------+
| now()               |
+---------------------+
| 2019-12-10 21:11:56 |
+---------------------+
1 row in set (0.000 sec)

MariaDB [observium]>

 

This is also showing the correct time.

 

I even tried adding "default-time-zone='-05:00'" to "/etc/mysql/my.cnf" and restarting the database and that didn't make any difference. The graphs are still in UTC.

 

I'm not sure what's the problem at this point.

Thank you for checking. Im using the beta image and have also set my timezone via the TZ variable but to no avail.

When i run /opt/observium/poller.php -d i can see the correct timezone is set, yes the graphs are still 1 hour off.

Link to comment
On 12/11/2019 at 2:27 AM, uberchuckie said:

Can you post the log file?

Here is the content of the beginning of the log file. The docker was updated yesterday with the new version.

 

** Running /etc/my_init.d/10_syslog-ng.init...
Dec 11 02:35:38 99818e7bd47a syslog-ng[12]: syslog-ng starting up; version='3.13.2'
*** Running /etc/my_init.d/firstrun.sh...
Using existing PHP database config file.
warning: commands will be executed using /bin/sh
job 1 at Wed Dec 11 02:36:00 2019
Timezone not specified by environment variable
*** Booting runit daemon...
*** Runit started as PID 35
Database exists.
Starting MariaDB...
Dec 11 02:37:42 99818e7bd47a cron[41]: (CRON) INFO (pidfile fd = 3)
Dec 11 02:37:42 99818e7bd47a cron[41]: (CRON) INFO (Running @reboot jobs)
191211 02:37:42 mysqld_safe Logging to '/config/databases/99818e7bd47a.err'.
191211 02:37:42 mysqld_safe Starting mysqld daemon with databases from /config/databases
Dec 11 02:39:01 99818e7bd47a CRON[304]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Dec 11 02:40:01 99818e7bd47a CRON[351]: (root) CMD (   /opt/observium/poller-wrapper.py 2 >> /dev/null 2>&1)
Dec 11 02:40:01 99818e7bd47a CRON[352]: (root) CMD (   /opt/observium/discovery.php -h new >> /dev/null 2>&1)

Link to comment
On 12/14/2019 at 3:33 PM, uberchuckie said:

 

Try deleting your observium directory under the appdata volume mount and start the container again. Let the database initialization script run to its completion.

Tried to delete the folder but I get the same error. 

 

This is the content from the db.log if it could help in finding the problem.

 

[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'dbSchema';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.dbSchema' doesn't exist), Query: SELECT `version` FROM `dbSchema` ORDER BY `version` DESC LIMIT 1
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'current_rev';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'current_version';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.eventlog' doesn't exist), Query: INSERT INTO `eventlog` (`device_id`,`entity_id`,`entity_type`,`timestamp`,`severity`,`message`)  VALUES ('0',NULL,'global',NOW(),'5','Observium updated:  -> 19.8.10000')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT EXISTS (SELECT 1 FROM `observium_attribs` WHERE `attrib_type` = 'current_rev')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: INSERT INTO `observium_attribs` (`attrib_type`,`attrib_value`)  VALUES ('current_rev','10000')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT EXISTS (SELECT 1 FROM `observium_attribs` WHERE `attrib_type` = 'current_version')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: INSERT INTO `observium_attribs` (`attrib_type`,`attrib_value`)  VALUES ('current_version','19.8.10000')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.config' doesn't exist), Query: SELECT * FROM `config`
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'dbSchema';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.dbSchema' doesn't exist), Query: SELECT `version` FROM `dbSchema` ORDER BY `version` DESC LIMIT 1
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.devices' doesn't exist), Query: SELECT 1 FROM `devices` LIMIT 1;

Link to comment
1 minute ago, tylerism said:

Tried to delete the folder but I get the same error. 

 

This is the content from the db.log if it could help in finding the problem.

 

[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'dbSchema';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.dbSchema' doesn't exist), Query: SELECT `version` FROM `dbSchema` ORDER BY `version` DESC LIMIT 1
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'current_rev';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'current_version';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.eventlog' doesn't exist), Query: INSERT INTO `eventlog` (`device_id`,`entity_id`,`entity_type`,`timestamp`,`severity`,`message`)  VALUES ('0',NULL,'global',NOW(),'5','Observium updated:  -> 19.8.10000')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT EXISTS (SELECT 1 FROM `observium_attribs` WHERE `attrib_type` = 'current_rev')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: INSERT INTO `observium_attribs` (`attrib_type`,`attrib_value`)  VALUES ('current_rev','10000')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT EXISTS (SELECT 1 FROM `observium_attribs` WHERE `attrib_type` = 'current_version')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: INSERT INTO `observium_attribs` (`attrib_type`,`attrib_value`)  VALUES ('current_version','19.8.10000')
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.config' doesn't exist), Query: SELECT * FROM `config`
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.observium_attribs' doesn't exist), Query: SELECT `attrib_value` FROM `observium_attribs` WHERE `attrib_type` = 'dbSchema';
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.dbSchema' doesn't exist), Query: SELECT `version` FROM `dbSchema` ORDER BY `version` DESC LIMIT 1
[2019/12/15 08:26:46 +0100] discovery.php(371): Failed dbQuery (#1146 - Table 'observium.devices' doesn't exist), Query: SELECT 1 FROM `devices` LIMIT 1;

The database hasn't been created yet. Did you stop the container before deleting the appdata volume for observium?

Link to comment
  • 1 month later...
  • 1 month later...
On 2/27/2020 at 6:44 AM, gianpaoloracca said:

Hi @uberchuckie, I'm using your docker under Openmediavault, and I'm trying to use email notifications.

In the Alert Logging I see a ALERT_NOTIFY, but no email seems to be arriving. I checked the logs, but nowhere in the log files the alert checks or the email sending is mentioned. Any hint? Thanks.

I don't think alerts are supported in the Community Edition.

Link to comment

Just set this up today, works great if I access it directly on port 8668, but I want to use the Linuxserver.io letsencrypt container.  Does not seem to work correctly behind it.  Below is my config for it, any ideas?

 

# make sure that your dns has a cname set for observium and that your observium container is not using a base url

server {
    listen 443 ssl;

    server_name observium.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    location / {
        # enable the next two lines for http auth
        # auth_basic "Restricted";
        # auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /login;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_observium observium;
        proxy_pass http://$upstream_observium:8668;
    }
}

 

Link to comment
5 hours ago, smccloud said:

Just set this up today, works great if I access it directly on port 8668, but I want to use the Linuxserver.io letsencrypt container.  Does not seem to work correctly behind it.  Below is my config for it, any ideas?

 


# make sure that your dns has a cname set for observium and that your observium container is not using a base url

server {
    listen 443 ssl;

    server_name observium.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    location / {
        # enable the next two lines for http auth
        # auth_basic "Restricted";
        # auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /login;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_observium observium;
        proxy_pass http://$upstream_observium:8668;
    }
}

 

Check the nginx log and see what the error is. Did you define an upstream pool for observium? Try using the IP address instead for the proxy pass URL?

Link to comment
On 12/11/2019 at 3:32 AM, uberchuckie said:

I took a look at this...

 

I ran /opt/observium/poller.php -d and saw this:


#####  Timezones info  #####

 o Date                 Tuesday, 10-Dec-19 21:08:21 EST
 o PHP                  -05:00
 o MySQL                -05:00

 

This looks like it's correct and PHP and MySQL have matching time offset.


root@c3b53bf2ea0d:/opt/observium# mysql -u observium -p observium
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.4.8-MariaDB-1:10.4.8+maria~bionic-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [observium]> select now();
+---------------------+
| now()               |
+---------------------+
| 2019-12-10 21:11:56 |
+---------------------+
1 row in set (0.000 sec)

MariaDB [observium]>

 

This is also showing the correct time.

 

I even tried adding "default-time-zone='-05:00'" to "/etc/mysql/my.cnf" and restarting the database and that didn't make any difference. The graphs are still in UTC.

 

I'm not sure what's the problem at this point.

 

I had same problems with another docker for observium, perhaps is too late for answer, but the fix is to add volume for /etc/localtime:

volumes:
  - /etc/localtime:/etc/localtime:ro

With this the datetime shows correctly on graph. Hope it helps

Edited by Bluesnow
check grammar
  • Thanks 1
Link to comment
  • 3 weeks later...
  • 4 weeks later...
On 2/27/2020 at 5:44 AM, gianpaoloracca said:

Hi @uberchuckie, I'm using your docker under Openmediavault, and I'm trying to use email notifications.

In the Alert Logging I see a ALERT_NOTIFY, but no email seems to be arriving. I checked the logs, but nowhere in the log files the alert checks or the email sending is mentioned. Any hint? Thanks.

@gianpaoloracca & @uberchuckie

 

I can confirm email alerts do work with the community edition & with this docker in unraid.

 

Reference for original config I used: https://jira.observium.org/browse/OBS-1267

I based my config on the one Matthew Lynch posted there but changed it from using sendmail to use smtp & it worked.

For email alerts to work you have to edit config.php within the appdata & add the below config while changing the fields to fill in with your data.

 

Example of the config I used in my setup:

 

// Set up a default alerter (email to a single address)
$config['alerts']['alerter']['default']['descr'] = "Default Email Alert";
$config['alerts']['alerter']['default']['type'] = "email";
$config['alerts']['alerter']['default']['contact'] = "[email protected]"; //The default email contact you want notifications to be delivered to
$config['alerts']['alerter']['default']['enable'] = TRUE;

$config['email']['default'] = "[email protected]"; //The default email contact you want notifications to be delivered to
$config['alerts']['email']['from'] = "Observium <[email protected]>";  //The email address the notification will be sent from.
$config['email']['default_only'] = TRUE;

 

//Email Settings

$config['email']['enable'] = TRUE;
$config['email']['from'] = '[email protected]'; //The email address the notification will be sent from.
$config['email']['default'] = '[email protected]'; //The default email contact you want notifications to be delivered to
$config['email']['backend'] = 'smtp';
$config['email']['sendmail_path'] = '/usr/sbin/sendmail';
$config['email']['smtp_host'] = 'smtp.domain.com';
$config['email']['smtp_port'] = 587;
$config['email']['smtp_timeout'] = 10;
$config['email']['smtp_auth'] = TRUE;
$config['email']['smtp_username'] = 'NULL'; //usually the email address used for sending emails.
$config['email']['smtp_password'] = 'NULL'; 

 

//Had to change the backend from sendmail to smtp & comment out with // or remove the sendmail section.

$config['email']['backend'] = "smtp";
//$config['email']['sendmail_path'] = "/usr/bin/sendmail -t -i";

 

NOTE: When I tested after copying what they had and filling in everything with my email info & tried to do a test from console the backend: sendmail didn't work so I had to comment out the last line regarding sendmail_path and change the backend = from sendmail to be smtp.

 

 

If you wish to copy what I have here and add it to your config.php from the appdata you can just fill in with your info.

 

Once you have that configured you can test it easily by doing the following. 

1. In the Observium web add an email contact in the contacts section. Note the ID number on the left once it is added.

2. Load up the console of the docker container.

3. type the following command. Replacing the 1 with the ID of your contact you want the test email to be delivered to.

./opt/observium/test_alert.php  -c 1

4. It should give you either an OK or a failure with an error code.

 

Also, on the link above someone provided a sample set you can use for creating a generic ruleset alert checkers.

http://imgur.com/q34ZBWQ

 

Edited by neighborhdtechgeek
  • Thanks 1
Link to comment

I too am having the issue of the default login/password not working.  I've stopped the container, deleted the contents of the appdata folder, and restarted.  I've also deleted the container image and reinstalled it.  Sometimes when accessing the webinterface it gives this error:

 

DB Error 2002: No such file or directory

 

 

A common item I've seen in the logs is this error:

 

[0;35m o [1;37mMySQL [0m ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

 

And then after it's been running for a while it seems to repeat this MariaDB entry:

 

Starting MariaDB...
200731 10:43:51 mysqld_safe Logging to '/config/databases/ea65e1ef1086.err'.
200731 10:43:51 mysqld_safe Starting mariadbd daemon with databases from /config/databases
Database exists.
Starting MariaDB...
200731 10:43:52 mysqld_safe Logging to '/config/databases/ea65e1ef1086.err'.
200731 10:43:52 mysqld_safe Starting mariadbd daemon with databases from /config/databases
Database exists.
Starting MariaDB...
200731 10:43:53 mysqld_safe Logging to '/config/databases/ea65e1ef1086.err'.
200731 10:43:53 mysqld_safe Starting mariadbd daemon with databases from /config/databases
Database exists.
Starting MariaDB...
200731 10:43:54 mysqld_safe Logging to '/config/databases/ea65e1ef1086.err'.
200731 10:43:54 mysqld_safe Starting mariadbd daemon with databases from /config/databases
Database exists.
Starting MariaDB...
200731 10:43:55 mysqld_safe Logging to '/config/databases/ea65e1ef1086.err'.
200731 10:43:55 mysqld_safe Starting mariadbd daemon with databases from /config/databases

 

 

Attached is a C&P of the Observium log.  I've also tried running the container as Privileged.  I'm running unRAID 6.8.3. 

 

**EDIT** I also haven't touch the config.php in the Observium  appdata folder.  Are we able to point to an existing MariaDB container?

 

**EDIT #2**  Somehow got it working.  I edited the config.php to point to my MariaDB Container used by other containers. 

 

// Database config ---  This MUST be configured
$config['db_extension'] = 'mysqli';
$config['db_host']      = '10.0.0.90:3306';
$config['db_user']      = 'observium';
$config['db_pass']      = 'xxxxxxxxxxxxxxxxxx';  //<--- SAME PASSWORD GENERATED IN OBSERVIUM LOGS
$config['db_name']      = 'observium';

// Base directory
#$config['install_dir'] = "/opt/observium";

// Default community list to use when adding/discovering
$config['snmp']['community'] = array("public");

// Authentication Model
$config['auth_mechanism'] = "mysql";    // default, other options: ldap, http-auth, please see documentation for config help

// Enable alerter
// $config['poller-wrapper']['alerter'] = TRUE;

//$config['web_show_disabled'] = FALSE;    // Show or not disabled devices on major pages.

// Set up a default alerter (email to a single address)
//$config['email']['default']        = "user@your-domain";
//$config['email']['from']           = "Observium <observium@your-domain>";
//$config['email']['default_only']   = TRUE;

// End config.php
                                                      
                                                      
                                                    

 

I also edited with the Observium docker container settings by enabling Privileged, deleted the files except the edited config.php and lo and behold it's working now.  No idea what the problem was.

 

image.thumb.png.023b15adf73bd14ae23941fa5e6e4aaa.png

 

 

 

Observium_LOG_07312020.txt

Edited by kimocal
more details
Link to comment

@kimocal The embedded MariaDB service was stuck in a restart loop. The /config/databases/ea65e1ef1086.err file should show why. I've had this error once before. MariaDB couldn't read the InnoDB files for me. Restoring from backups or creating the database from scratch resolved the issue for me.

 

This image doesn't need privileged access and works without it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.