Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-3020

Getting wrong time in both event log and syslog log how to correct the same.

Details

    • Help
    • Resolution: Not A Bug
    • Major
    • None
    • Professional Edition
    • Alerting
    • Cent OS 7

    Description

      Attachments

        Activity

          [OBS-3020] Getting wrong time in both event log and syslog log how to correct the same.

          Sorry for delay.

          You have not correct php timezone, you must configure correct timezone in php.ini config date.timezone.
          See: https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone

          landy Mike Stupalov added a comment - Sorry for delay. You have not correct php timezone, you must configure correct timezone in php.ini config date.timezone . See: https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone

          yah, incorrect cmd, should be:

          ./discovery.php -VV

          landy Mike Stupalov added a comment - yah, incorrect cmd, should be: ./discovery.php -VV
          balaji Balaji.K added a comment -
                  1. Timezones info #####

          o Date Monday, 27-May-19 13:02:40 UTC
          o PHP +00:00
          o MySQL -04:00

          I am getting this output of ./poller.php -d

          So,how can i fix this issue.

          balaji Balaji.K added a comment - Timezones info ##### o Date Monday, 27-May-19 13:02:40 UTC o PHP +00:00 o MySQL -04:00 I am getting this output of ./poller.php -d So,how can i fix this issue.
          balaji Balaji.K added a comment -

          Dear Mike,

          I am getting only this.

          Output of
          ./discovery.php -V

          [root@obse observium]# ./discovery.php -V
          Observium 18.10.9472

          MY mysql:

          [mysqld]
          datadir=/var/lib/mysql
          socket=/var/lib/mysql/mysql.sock

          1. Disabling symbolic-links is recommended to prevent assorted security risks
            symbolic-links=0
          2. Settings user and group are ignored when systemd is used.
          3. If you need to run mysqld under a different user or group,
          4. customize your systemd unit file for mariadb according to the
          5. instructions in http://fedoraproject.org/wiki/Systemd

          [mysqld_safe]
          log-error=/var/log/mariadb/mariadb.log
          pid-file=/var/run/mariadb/mariadb.pid
          default-time-zone = ‘+05:30’

          #

          1. include all files from the config directory
            #
            !includedir /etc/my.cnf.d

          How can i change timezone in php? Kindly guide me to fix this issue.

          balaji Balaji.K added a comment - Dear Mike, I am getting only this. Output of ./discovery.php -V [root@obse observium] # ./discovery.php -V Observium 18.10.9472 MY mysql: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 Settings user and group are ignored when systemd is used. If you need to run mysqld under a different user or group, customize your systemd unit file for mariadb according to the instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid default-time-zone = ‘+05:30’ # include all files from the config directory # !includedir /etc/my.cnf.d How can i change timezone in php? Kindly guide me to fix this issue.

          Ahh, than you have incorrect timezone configured in php:
          See output for:

          ./discovery.php -V

          landy Mike Stupalov added a comment - Ahh, than you have incorrect timezone configured in php: See output for: ./discovery.php -V
          balaji Balaji.K added a comment -

          Event log & Syslog i have to get IST time. But i am getting different in hours.
           

          2019-05-23 11:05:14 hua5700-ayapakkam-branch-office-dpsw Gi0/0/2 Interface Down: [ifOperStatus] 'up' -> 'down'

           
          This is my current alert but my current time is 2019-05-23 20:38 hours. How can i adjust time to correct time.
           

          balaji Balaji.K added a comment - Event log & Syslog i have to get IST time. But i am getting different in hours.   2019-05-23 11:05:14 hua5700-ayapakkam-branch-office-dpsw Gi0/0/2 Interface Down: [ifOperStatus] 'up' -> 'down'   This is my current alert but my current time is 2019-05-23 20:38 hours. How can i adjust time to correct time.  

          Not understand question.

          Normal alerts have time, when it's polled (this is around cron run time),
          syslog alert/entries have time immediately upon receipt syslog message.
          This times will different always.

          landy Mike Stupalov added a comment - Not understand question. Normal alerts have time, when it's polled (this is around cron run time), syslog alert/entries have time immediately upon receipt syslog message. This times will different always.

          People

            adama Adam Armstrong
            balaji Balaji.K
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: