graphite-web icon indicating copy to clipboard operation
graphite-web copied to clipboard

[BUG]Graphs not saving

Open itinneed2022 opened this issue 1 year ago • 6 comments

Describe the bug When creating a graph, I see the "Save to My Graphs - Result Graph saved successfully" message, but the graph neither appears under "My Graphs" nor is there an entry in the graphitedb.

To Reproduce Steps to reproduce the behavior: Login to Graphite-Web, select a couple of datapoints, and save the graph as any name.

Expected behavior A graph should appear under "My Graphs" by the name given.

Screenshots image

image image

Environment (please complete the following information):

  • OS flavor: Red Hat Enterprise 9
  • Graphite-web version 1.1.1
  • Django/Python version Python 3.9
  • Setup type From Sources this was an upgrade from a prior version of Red Hat.

Additional context Here are the permissions for the graphite user in the database:

mysql> show grants for graphite_user@localhost;
+--------------------------------------------------------------------------+
| Grants for graphite_user@localhost                                       |
+--------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `graphite_user`@`localhost`                        |
| GRANT ALL PRIVILEGES ON `graphitedb`.* TO `graphite_user`@`localhost`    |
| GRANT ALL PRIVILEGES ON `graphite_prod`.* TO `graphite_user`@`localhost` |
+--------------------------------------------------------------------------+
3 rows in set (0.01 sec)

itinneed2022 avatar Oct 18 '24 15:10 itinneed2022

Works for me with graphite-web 1.1.10. You should look into:

  • web browser Developer tools for failing requests.
  • server side logs (application server or graphite logs)

niol avatar Oct 23 '24 08:10 niol

The server side logs have nothing in them about saved graphs :(

itinneed2022 avatar Oct 23 '24 13:10 itinneed2022

I do see this in the error log: [Mon Oct 28 15:23:04.075030 2024] [access_compat:error] [pid 134845] [client 10.192.152.205:63034] AH01797: client denied by server configuration: /app/graphite/conf/graphite.wsgi, referer: https://graphite.mycompany.com/composer?showTarget=CI_unixsys.aadprddb02_mycompany_com.cpu-0.percent-idle&width=586&height=308&target=CI_unixsys.aadprddb02_mycompany_com.cpu-0.percent-idle It shows up anytime I click a graph or try to save one.

itinneed2022 avatar Oct 28 '24 19:10 itinneed2022

I found the issue, I'm missing tables:

+----------------------------+
| Tables_in_graphitedb       |
+----------------------------+
| account_mygraph            |
| account_profile            |
| account_variable           |
| account_view               |
| account_window             |
| auth_group                 |
| auth_group_permissions     |
| auth_permission            |
| auth_user                  |
| auth_user_groups           |
| auth_user_user_permissions |
| dashboard_dashboard        |
| dashboard_dashboard_owners |
| dashboard_template         |
| dashboard_template_owners  |
| django_admin_log           |
| django_content_type        |
| django_migrations          |
| django_session             |
| events_event               |
| tagging_tag                |
| tagging_taggeditem         |
| tags_series                |
| tags_seriestag             |
| tags_tag                   |
| tags_tagvalue              |
| url_shortener_link         |
+----------------------------+

Actual database:

+--------------------------------------+
| Tables_in_graphite_restore_from_prod |
+--------------------------------------+
| account_mygraph                      |
| account_profile                      |
| account_variable                     |
| account_view                         |
| account_window                       |
| auth_group                           |
| auth_group_permissions               |
| auth_permission                      |
| auth_user                            |
| auth_user_groups                     |
| auth_user_user_permissions           |
| dashboard_dashboard                  |
| dashboard_dashboard_owners           |
| django_admin_log                     |
| django_content_type                  |
| django_migrations                    |
| django_session                       |
| events_event                         |
| tagging_tag                          |
| tagging_taggeditem                   |
+--------------------------------------+

graphite_restore_from_prod is a copy of my production db I put on my dev server. graphitedb is the original dev setup. Is there anyway to add the missing tables?

itinneed2022 avatar Oct 28 '24 19:10 itinneed2022

I'm trying to run the migration: PYTHONPATH=/opt/graphite/webapp /app/graphite/lib/python3.9/site-packages/django/bin/django-admin.py migrate --no-input --settings=graphite.settings --fake-initial

But I'm getting: django.db.utils.OperationalError: (1050, "Table 'dashboard_dashboard' already exists")

Any advice? I copied this database from my red hat 7 setup which was on the same version of Graphite.

itinneed2022 avatar Oct 28 '24 20:10 itinneed2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 15:04 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 27 '25 04:06 stale[bot]