Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when saving changes to Data Collectors #2273

Closed
hmorandell opened this issue Jan 5, 2019 · 6 comments
Closed

Error when saving changes to Data Collectors #2273

hmorandell opened this issue Jan 5, 2019 · 6 comments
Labels
resolved A fixed issue

Comments

@hmorandell
Copy link
Contributor

hmorandell commented Jan 5, 2019

Hi,
when I save changes to the main Data Collectors, I get this warning and error in the logfile:

2019/01/05 14:35:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/pollers.php[217]:form_save(), /pollers.php[290]:CactiErrorHandler())
--
2019/01/05 14:35:35 - ERROR PHP NOTICE: Undefined index: dbhost in file: /var/www/html/pollers.php on line: 290

the changes are saved, just wanted to let you now maybe this one should be fixed.

@cigamit
Copy link
Member

cigamit commented Jan 8, 2019

This is indicative of a bad upgrade. That column was added in 1.0, your database permissions may be blocking you from dropping a table, and that may have caused this. The default database permissions required by the Cacti installer are GRANT ALL, though some administrators try to lock things down. In the 1.0 upgrade, we drop the poller table and re-create it. If you are running multiple data collectors, you might want to manually add the column in, otherwise, you can run the following from the cli:

php -q upgrade_database.php --forcever=0.8.8h

That should add that column as expected.

@hmorandell
Copy link
Contributor Author

strange - I executed this statement now but I had a clean install before/ I upgraded before from 0.8.8 to 1.2.0 beta 4.
My poller table looks like this

           id: 1
     disabled:
         name: Main Poller
        notes:
       status: 2
     timezone: Europe/Moscow
     hostname: bvpcactihd
    dbdefault: cacti
       dbhost: bvpcactihd
       dbuser:
       dbpass:
       dbport: 3306
        dbssl:
      dbsslca: NULL
    dbsslcert: NULL
     dbsslkey: NULL
   total_time: 36.2914
     max_time: 48.312108039856
     min_time: 32.463814020157
     avg_time: 35.66421884795
  total_polls: 48
    processes: 2
      threads: 20
sync_interval: 7200
         snmp: 29064
       script: 226
       server: 5
  last_update: 2019-01-08 19:59:38
  last_status: 2019-01-08 19:59:38
    last_sync: 0000-00-00 00:00:00

when I change values and save the Data Collector, the error still remains.... Any idea?

@netniV
Copy link
Member

netniV commented Jan 8, 2019

That looks OK. Can you run desc poller in mysql and post the results.

@hmorandell
Copy link
Contributor Author

MariaDB [cacti]> desc poller;
+---------------+-----------------------+------+-----+---------------------+----------------+
| Field         | Type                  | Null | Key | Default             | Extra          |
+---------------+-----------------------+------+-----+---------------------+----------------+
| id            | smallint(5) unsigned  | NO   | PRI | NULL                | auto_increment |
| disabled      | char(2)               | YES  | MUL |                     |                |
| name          | varchar(30)           | YES  | MUL | NULL                |                |
| notes         | varchar(1024)         | YES  |     |                     |                |
| status        | int(10) unsigned      | NO   |     | 0                   |                |
| timezone      | varchar(40)           | YES  |     |                     |                |
| hostname      | varchar(100)          | NO   |     |                     |                |
| dbdefault     | varchar(20)           | NO   |     | cacti               |                |
| dbhost        | varchar(64)           | NO   |     | cacti               |                |
| dbuser        | varchar(20)           | NO   |     |                     |                |
| dbpass        | varchar(64)           | NO   |     |                     |                |
| dbport        | int(10) unsigned      | YES  |     | 3306                |                |
| dbssl         | char(3)               | YES  |     |                     |                |
| dbsslca       | varchar(255)          | YES  |     | NULL                |                |
| dbsslcert     | varchar(255)          | YES  |     | NULL                |                |
| dbsslkey      | varchar(255)          | YES  |     | NULL                |                |
| total_time    | double                | YES  |     | 0                   |                |
| max_time      | double                | YES  |     | NULL                |                |
| min_time      | double                | YES  |     | NULL                |                |
| avg_time      | double                | YES  |     | NULL                |                |
| total_polls   | int(11)               | YES  |     | 0                   |                |
| processes     | int(11)               | YES  |     | 1                   |                |
| threads       | double                | YES  |     | 1                   |                |
| sync_interval | int(11)               | YES  |     | 7200                |                |
| snmp          | mediumint(8) unsigned | YES  |     | 0                   |                |
| script        | mediumint(8) unsigned | YES  |     | 0                   |                |
| server        | mediumint(8) unsigned | YES  |     | 0                   |                |
| last_update   | timestamp             | NO   |     | 0000-00-00 00:00:00 |                |
| last_status   | timestamp             | NO   |     | 0000-00-00 00:00:00 |                |
| last_sync     | timestamp             | NO   |     | 0000-00-00 00:00:00 |                |
| requires_sync | char(3)               | NO   |     |                     |                |
+---------------+-----------------------+------+-----+---------------------+----------------+

here we go!

@cigamit
Copy link
Member

cigamit commented Jan 8, 2019

Okay, this is resolved. Thanks for reporting. Download latest pollers.php, confirm and then close if you are satisfied.

@cigamit cigamit added the resolved A fixed issue label Jan 8, 2019
cigamit added a commit that referenced this issue Jan 8, 2019
Error when saving changes to Data Collectors
@hmorandell
Copy link
Contributor Author

Hi, I can confirm that the issuee is now solved! Thanks

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants