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

Allow Remote Data Collectors to maintain their own path variables #2989

Closed
bmfmancini opened this issue Sep 30, 2019 · 16 comments
Closed

Allow Remote Data Collectors to maintain their own path variables #2989

bmfmancini opened this issue Sep 30, 2019 · 16 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@bmfmancini
Copy link
Member

Hey Guys

I had a DB crash on a remote poller and I dropped and re-created the db
I imported cacti.sql and its up and running with the exception that the poller will not run the log shows that the location for spine is invlaid

2019/09/30 11:43:02 - POLLER: Poller[2] ERROR: The spine path: is invalid. Poller can not continue!

image

Any ideas ?

@bmfmancini
Copy link
Member Author

ls /usr/local/spine/bin/
spine

@bmfmancini
Copy link
Member Author

weirdly when I run spine manually this is the output

2019/09/30 12:07:53 - SPINE: Poller[1] ERROR: SS[3] Script Server did not start properly return message was: 'U'
2019/09/30 12:07:53 - SPINE: Poller[1] ERROR: SS[4] Script Server did not start properly return message was: 'U'

@bmfmancini
Copy link
Member Author

Very weird I went back to the main poller as well and saved the config tried replicating no go
I also tried to drop the db and re-import still same issue

@bmfmancini
Copy link
Member Author

Ok I went as far a reinstalling cacti

it refuses to see the spine directory ... I am at a loss

@bmfmancini
Copy link
Member Author

I now get tons of these errors for every file in the resource cache
from Cache has an error while checking syntax (127) while executing: ' -l /tmp/ccpZOZdYV'

@bmfmancini
Copy link
Member Author

Ok close so it seems any path cacti needs to check it cant see

i.e it cant see /usr/local/spine
its also reporting that the plugin files are missing but they are indeed there

Permissions are fine from what i can tell

@bmfmancini
Copy link
Member Author

Well here is my issue

Database changed
MariaDB [cacti]> SELECT name,value FROM settings where name like 'path_%';
+--------------+---------------------+
| name | value |
+--------------+---------------------+
| path_webroot | /var/www/html/cacti |

It doesnt make sense I have dropped this db so many times !

@bmfmancini
Copy link
Member Author

@cigamit is there a way to manually insert the missing path records ?

@bmfmancini
Copy link
Member Author

OK looks like I am back on track here is what I did

Disabled the poller from the main poller
drop the db
created the db and imported as per usual
finally got the cacti install page
came up as a new poller in the main poller page
moved the devices to the poller named new poller
delete old poller name

All good

@cigamit
Copy link
Member

cigamit commented Oct 1, 2019

The big thing, and if you want to do a doc pull request on this, it would help. Here is what 'should' work anyway:

  1. ALWAYS disable crontab on the new server
  2. Perform a full Remote Data Collector install
  3. Right now, it's going to create a new poller_id on the main server, so edit the config.php and change the poller_id back to the original
  4. Remove the new ghost remote poller from the main Cacti server
  5. Perform a full sync to the restored poller
  6. Re-enable crontab.

So, as of 1.2.7, steps 3 & 4 are hacks. We need a bug report on that. I mean for the Remote Poller install to detect if a poller already exists for the server in question.

@cigamit cigamit added the bug Undesired behaviour label Oct 1, 2019
@cigamit cigamit added this to the v1.2.8 milestone Oct 1, 2019
@bmfmancini
Copy link
Member Author

It was very weird you would think that the table for settings would have been replicated no matter what as the other settings were fine so I think its something on the settings table

@cigamit
Copy link
Member

cigamit commented Oct 1, 2019

Oh, so when you install, make sure you fill in the correct location for spine. Changing it afterwards might be harder. The full sync ignores the '%path%' stuff right now from the settings table.

@bmfmancini
Copy link
Member Author

in my case even after a DB drop and re-import it would re-sync where I went wrong was not to disable the poller from the main poller to prevent a db sync

I will work on the Doc soon since I know this is a pain point

@cigamit
Copy link
Member

cigamit commented Oct 1, 2019

Yea, forgot that too. The remote sync should only be say once a day in my opinion now with the latest Cacti, or when you make some fundamental settings changes, or you were making a lot of changes with the Remote Data Collectors offline. Most all actions sync dynamically to all Data Collectors now.

@cigamit cigamit changed the title cacti 1.2.5 remote poller reporting invalid spine location Allow Remote Data Collectors to maintain their own path variables Nov 9, 2019
cigamit added a commit that referenced this issue Nov 9, 2019
Allow Remote Data Collectors to maintain their own path variables
@cigamit
Copy link
Member

cigamit commented Nov 9, 2019

Okay, this is resolved now. All 'path_%' and '%_path' variables on the 'Paths' page from the remote poller are only saved there. They are not overwritten when you save from the Poller ID 1 now either.

@cigamit cigamit added the resolved A fixed issue label Nov 9, 2019
@cigamit
Copy link
Member

cigamit commented Nov 9, 2019

This does not mean that one data collector can be using spine, and the other can use cmd.php.

@cigamit cigamit closed this as completed Nov 9, 2019
@github-actions github-actions bot locked 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
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants