From 836b47cb7e99a977c5a23b059ca1d0b5065d310e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 24 Jul 2024 11:54:23 +0200 Subject: Merging upstream version 1.46.3. Signed-off-by: Daniel Baumann --- web/gui/confluence/README.md | 1023 ------------------------------------------ 1 file changed, 1023 deletions(-) delete mode 100644 web/gui/confluence/README.md (limited to 'web/gui/confluence/README.md') diff --git a/web/gui/confluence/README.md b/web/gui/confluence/README.md deleted file mode 100644 index d76aabf78..000000000 --- a/web/gui/confluence/README.md +++ /dev/null @@ -1,1023 +0,0 @@ - - -# Atlassian Confluence dashboards - -With Netdata you can build **live, interactive, monitoring dashboards** directly on Atlassian's **Confluence** pages. - -I see you already asking "why should I do this?" - -Well... think a bit of it.... confluence is the perfect place for something like that: - -1. All the employees of your company already have access to it. - -2. Most probably you have already several spaces on confluence, one for each project or service. Adding live monitoring information there is ideal: everything in one place. Your users will just click on the page and instantly the monitoring page they need will appear with only the information they need to know. - -3. You can create monitoring pages for very specific purposes, hiding all the information that is too detailed for most users, or explaining in detail things that are difficult for them to understand. - -So, what can we expect? What can Netdata do on confluence? - -You will be surprised! **Everything a Netdata dashboard does!**. Example: - -![final-confluence4](https://user-images.githubusercontent.com/2662304/34366214-767fa4b8-eaa1-11e7-83af-0b9b9b72aa73.gif) - -Let me show you how. - -> Let's assume we have 2 web servers we want to monitor. We will create a simple dashboard with key information about them, directly on confluence. - -### Before you begin - -Most likely your confluence is accessible via HTTPS. So, you need to proxy your Netdata servers via an apache or nginx to make them HTTPS too. If your Confluence is HTTPS but your Netdata are not, you will not be able to fetch the Netdata content from the confluence page. The Netdata wiki has many examples for proxying Netdata through another web server. - -> So, make sure Netdata and Confluence can be accessed with the same protocol (**http**, or **https**). - -For our example, I will use these 2 servers: - -| server | url | -|------|---| -| Server 1 | | -| Server 2 | | - -I will use the first server for the static dashboard javascript files. - ---- - -Then, you need to enable the `html` plugin of confluence. We will add some plain html content on that page, and this plugin is required. - -### Create a new page - -Create a new confluence page and paste this into an `html` box: - -```html - - - -``` - -like this (type `{html` for the html box to appear - you need the confluence html plugin enabled): - -![screenshot from 2017-12-25 00-46-20](https://user-images.githubusercontent.com/2662304/34329541-1dd9077c-e90d-11e7-988d-6820be31ff3f.png) - -### Add a few badges - -Then, go to your Netdata and copy an alert badge (the `` version of it): - -![copy-embed-badge](https://user-images.githubusercontent.com/2662304/34329562-dddea37e-e90d-11e7-9830-041a9f6a5984.gif) - -Then add another HTML box on the page, and paste it, like this: - -![screenshot from 2017-12-25 00-55-18](https://user-images.githubusercontent.com/2662304/34329569-4fc3d07c-e90e-11e7-8127-3127a21e1657.png) - -Hit **update** and you will get this: - -![screenshot from 2017-12-25 00-56-58](https://user-images.githubusercontent.com/2662304/34329573-8d4237cc-e90e-11e7-80bf-6c260456c690.png) - -This badge is now auto-refreshing. It will update itself based on the update frequency of the alert. - -> Keep in mind you can add badges with custom Netdata queries too. Netdata automatically creates badges for all the -> alerts, but every chart, every dimension on every chart, can be used for a badge. And Netdata badges are quite -> powerful! Check [Creating Badges](https://github.com/netdata/netdata/blob/master/web/api/badges/README.md) for more information on badges. - -So, let's create a table and add this badge for both our web servers: - -![screenshot from 2017-12-25 01-06-10](https://user-images.githubusercontent.com/2662304/34329609-d3e9ab00-e90f-11e7-99df-884196347538.png) - -Now we get this: - -![screenshot from 2017-12-25 01-07-10](https://user-images.githubusercontent.com/2662304/34329615-f7dea286-e90f-11e7-9b6f-600215494f96.png) - -### Add a Netdata chart - -The simplest form of a chart is this (it adds the chart `web_log_nginx_netdata.response_statuses`, using 100% of the width, 150px height, and the last 10 minutes of data): - -```html -
-``` - -Add this to `html` block on confluence: - -![screenshot from 2017-12-25 01-13-15](https://user-images.githubusercontent.com/2662304/34329635-cf83ab0a-e910-11e7-85a3-b72ccc2d54e4.png) - -And you will get this: - -![screenshot from 2017-12-25 01-14-09](https://user-images.githubusercontent.com/2662304/34329640-efd15574-e910-11e7-9004-94487dcde154.png) - -> This chart is **alive**, fully interactive. You can drag it, pan it, zoom it, etc like you do on Netdata dashboards! - -Of course this too big. We need something smaller to add inside the table. Let's try this: - -```html -
-``` - -The chart name is shown on all Netdata charts, so just copy it from a Netdata dashboard. - -We will fetch the same chart from both servers. To define the server we also added `data-host=` with the URL of each server, like this (we also added `
` for a newline between the badge and the chart): - -![screenshot from 2017-12-25 01-25-05](https://user-images.githubusercontent.com/2662304/34329695-76fd2680-e912-11e7-9969-87f8d5b36145.png) - -Which gives us this: - -![screenshot from 2017-12-25 01-26-04](https://user-images.githubusercontent.com/2662304/34329700-989f0f2e-e912-11e7-8ac9-c78f82cfbdb0.png) - -Note the color difference. This is because Netdata automatically hides dimensions that are just zero (the frankfurt server has only successful requests). To instruct Netdata to disable this feature, we need to add another html fragment at the bottom of the page (make sure this is added after loading `dashboard.js`). So we edit the first block we added, and append a new ` - - - - -``` - -Now they match: - -![screenshot from 2017-12-25 01-30-14](https://user-images.githubusercontent.com/2662304/34329716-2ea83680-e913-11e7-847e-52b3f402aeb0.png) - -#### more options - -If you want to change the colors append `data-colors="#001122 #334455 #667788"`. The colors will be used for the dimensions top to bottom, as shown on a Netdata dashboard. Keep in mind the default Netdata dashboards hide by default all dimensions that are just zero, so enable them at the dashboard settings to see them all. - -You can get a percentage chart, by adding these on these charts: - -```html - data-append-options="percentage" - data-decimal-digits="0" - data-dygraph-valuerange="[0, 100]" - data-dygraph-includezero="true" - data-units="%" -``` - -The first line instructs Netdata to calculate the percentage of each dimension, the second strips any fractional digits, the third instructs the charting library to size the chart from 0 to 100, the next one instructs it to include 0 in the chart and the last changes the units of the chart to `%`. This is how it will look: - -![screenshot from 2017-12-25 01-45-39](https://user-images.githubusercontent.com/2662304/34329774-570ef990-e915-11e7-899f-eee939564aaf.png) - -You can make any number of charts have common min and max on the y-range by adding `common-min="NAME"` and `common-max="NAME"`, where `NAME` is anything you like. Keep in mind for best results all the charts with the same `NAME` should be visible at once, otherwise a not-visible chart will influence the range and until it is updated the range will not adapt. - -### Add gauges - -Let's now add a few gauges. The chart we added has several dimensions: `success`, `error`, `redirect`, `bad` and `other`. - -Let's say we want to add 2 gauges: - -1. `success` and `redirect` together, in blue -2. `error`, `bad` and `other` together, in orange - -We will add the following for each server. We have enclosed them in another a `
` because Confluence will wrap them if the page width is not enough to fit them. With that additional `
` they will always be next to each other. - -```html -
-
-
-``` - -Adding the above will give you this: - -![final-confluence](https://user-images.githubusercontent.com/2662304/34329813-636bb8de-e917-11e7-8cc7-19e197859008.gif) - -### Final source - for the confluence source editor - -If you enable the source editor of Confluence, you can paste the whole example (implementing the first image on this post and demonstrating everything discussed on this page): - -```html -

Monitoring the health of the web servers, by analyzing the response codes they send.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
LondonFrankfurtSan FranciscoToronto
- last hour -
- requests -
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
- last
1 hour
-
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
- last 10
minutes
-
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
-
-

-
-

- -
]]> - -

-
-

- -
- last 1
minute
-
-
-

-
-

- - -
-
]]>
-
-

-
-

-
-
-
-

-
-

- - -
-
]]>
-
-

-
-

-
-
-
-

-
-

- - -
-
]]>
-
-

-
-

-
-
-
-

-
-

- - -
-
]]>
-
-

-
-

-
-
- now - -
-

-
-

- - -
-
-
-
]]> - -

-
-

- -
-
-

-
-

- - -
-
-
-
]]> - -

-
-

- -
-
-

-
-

- - -
-
-
-
]]> - -

-
-

- -
-
-

-
-

- - -
-
-
-
]]> - -

-
-

- -
-

-
-

-

-
-

- - -// don't load bootstrap - confluence does not need this -var netdataNoBootstrap = true; - -// select the web notifications to show on this dashboard -// var netdataShowAlarms = true; -// var netdataAlarmsRecipients = [ 'sysadmin', 'webmaster' ]; - - - - - -]]> - -

-
-

-
- -
-
-
-
- -
-
-
-``` - - -- cgit v1.2.3