If you are a heavy user of Grafana, you do not need to import Grafana dashboards into Nightingale; you can simply embed the page. You can view the relevant data in the Dashboard —> Integrated Dashboard section.
Accessing Grafana
In the Integrated Dashboard, add a new configuration. The specific content to fill in is shown in the image below. After filling it out, you need to adjust the Grafana configuration based on different scenarios.
Scenario 1: Embedding across different domains
Accessing from different domains may lead to issues where embedded pages cannot set cookies, resulting in inaccessible content. One of the main phenomena is that after logging in on the homepage, the third-party iframe cannot set the logged-in information in cookies, causing the third-party page to be unable to retrieve the login information and always display the login page. Inspecting the debugging interface will show the following error:
To resolve the issue of cookies not being set, you need to modify the Grafana parameters. After making changes, restart Grafana for the configuration to take effect. The parameters are as follows:
[security]
cookie_secure = true # Enable cookies relying on HTTPS
cookie_samesite = none # Allow cookies to be sent with cross-site requests
allow_embedding = true # Allow embedding Grafana
Note that enabling cookie_secure
depends on HTTPS access. If you are not originally accessing via HTTPS, you need to add a proxy in Grafana and configure a self-signed certificate.
Once the access address is configured, you can log in to the embedded page.
Scenario 2: Embedding within the same domain
For embedding within the same domain, modify the Grafana configuration as follows:
[security]
allow_embedding = true # Allow embedding Grafana
[auth.anonymous] # Enable anonymous access as needed; parameters are not necessary to modify
enabled = true # Enable anonymous access
org_name = flashcat # Specify the organization name for anonymous users
org_role = Viewer # Specify the Viewer read-only permission for anonymous users