From abbd9b9f25612517e6af4e0c13f41efc7772380f Mon Sep 17 00:00:00 2001 From: odyslam Date: Fri, 20 Nov 2020 13:24:54 +0200 Subject: [PATCH 01/13] Remove handbook from discourse branch --- engagement-handbook.md | 190 ----------------------------------------- 1 file changed, 190 deletions(-) delete mode 100644 engagement-handbook.md diff --git a/engagement-handbook.md b/engagement-handbook.md deleted file mode 100644 index 1285291..0000000 --- a/engagement-handbook.md +++ /dev/null @@ -1,190 +0,0 @@ -> Community Relations are 80% Acknowledging an issue and 20% fixing it. - -# Introduction - -The most important part of the support journey is to acknowledge the issue that the user is facing, even if we don’t currently have a fix at hand. We can offer basic troubleshooting to get the discussion going (e.g installation method) and then inform the user that we are investigating the issue. - -It’s simple really, we want to be honest with the users and share whatever information we have (or it’s absence). Showcase that we care and share the debugging experience with him/her. Chances are that he/she is an engineer as well, thus he/she is interested in finding a solution not for utility but also as an engineer. - -Of course, we are not referring to cases where the tool breaks down and important business processes are at stake, but rather common issues that produce some discomfort to the UX. - -# Support at Netdata - -Netdata Agent and Netdata Cloud are **free** products, thus the support that we provide is **community-driven**. This means that the products are offered "as-is", while the team is engaged with users in order to help them become successful in monitoring their infrastructure and systems with Netdata. - -Our core focus is to get as much feedback as possible, while offering a superb user experience. - -**The main driver of the support is the community itself**. - -# Forum - -## Discourse Categories -The Forum categories and their respective goals can be found: - -The Forum Documentation: NetdataCommunity Forums - -The about this category topic on each category - -## Support Category -### User Goal - -I want to use/install/configure Netdata Agent and/or Netdata Cloud but I don’t know how to proceed or something is not working as I would expect it to work. - -According to the community user journey at the start of the handbook, all platforms lead to the Support category. - -## Whispers -Whispers are messages that are only visible to the group members. This functionality can be used to chat privately on the forum topic, without having to use another platform (Netdata’s slack channel). This enables us to have all the information regarding the particular subject in one place so that future Netdata team members can have access. (If the chat happened over slack, the information would have been lost). - -➡️ To create a whisper, follow the [Discourse documentation](https://meta.discourse.org/t/how-do-i-create-a-whisper-post/44247). - -# Discourse Groups -- Community -- Product -- Netdata Cloud Backend -- Netdata FE -- Netdata Agent - -Limit mention of engagement groups to only Netdata team group -- Either through group settings or make groups visible only to team members. - -![](https://i.imgur.com/Oh5L5fd.png) - -# How to respond to a user - -- Write short and sweet responses. No need to write a lot, but be kind. -- Don’t be too short; Avoid “Yes” and “Yes, thanks”. -- Address all the points of the users. Using bullet points works for everyone. -- Make sure you acknowledge how they feel. - - e.g “I understand that this is frustrating, but don’t worry, we are on top of it!” -[Source](https://petros.blog/2020/11/13/words-matter/) - -## Example for points (1,2) - -``` -> Will you do something about this unexpected behavior? - -A1 -> Yes. - -A2 -> Yes, absolutely. I have already shared the feedback with -our team. They are going to check it out. Thank you so -much for taking the time to share your feedback with us! -``` -It goes without saying that A2 is the better response. - -## Example for point 3 - -``` -> This does not always happen, but when it does it does not -let me do X. I expect to be able to do X, since other -products allow me to do it, and your product allows me to do -it in some cases. Is that normal? - -> Hi! I am not sure why this happens sometimes. It may not -be normal. I will investigate this and get back to -you. That's without any doubt not ideal, but if you do Z you -may achieve what you need. I hope that helps. Cheers, -Petros! -``` -This response addresses all points entirely: -1. it may not be normal → “Is this normal?” -2. If you do Z → “I expect to be able to do X…”. - 1. This is a workaround, it’s not ideal since the user would like to do X. -3. I don’t know/will investigate → “This does not always happen, it does not let me do X” - -## Point 4 - Empathy -If the user goes ahead and contact us, through the forums or email, this means that the user got affected by our product, in either a positive or negative manner, but he/she got affected. - -The user never fails, it’s always the fault of the design, which did not take into account the possibility of misuse. - -So, it doesn’t matter what is the fault. For a split second, the user’s feelings got hurt and he got negative feelings because of our product. Let’s try to change that! - -### Empathy -Empathy is the skill to be able to understand the feelings of another person. The thing is, it’s not very easy and when we do have it, we have to **actively communicate** it. **We have to show empathy.** - -``` -> Thank you for your feedback about your interaction with -our team yesterday. And sorry you didn't get good support -from us. -``` -For some reason, the user said that he/she was unhappy with the support. That’s fine, listen to the feedback he/she will give ( you might have to ask for it) and then consider it internally if it’s credible or not. - -**In any case**, acknowledge that they were unhappy (sorry you didn’t). **Acknowledging is NOT agreeing**, it’s just acknowledging. Showing that you understand, not that you agree. That’s sympathy. - -We focus on the fact that **they believe** that they had bad support, not that we actually gave bad support. Even if the user takes it as admitting fault, that’s ok. Be the bigger person. - -Of course, if you agree with their verdict, say so. It will only improve the relationship. - -## Keep the user in the loop - -1. Keep customers up to date, even if their issue hasn’t been resolved. -2. When it’s possible do the work for them. - 1. e.g Open the GitHub ticket instead of asking them to open one. -3. Make sure you circle back to the user every few days, so that they know they haven’t been forgotten. -4. Even if the bug hasn’t yet been picked up, just let them know that it’s under consideration but due to changing priorities, it has been delayed. The user wants honesty and usually, the user is not irrational. - - -# User FAQ and highlights - -## Debugging an issue - -### Reinstall Netdata - -If you can, please visit our documentation and re-install Netdata using the suggested method. Some Linux Distributions omit certain parts of Netdata in the packages that are offered via their Package Managers (e.g apt for Debian). We don’t have any control over the packages that are offered there. - -Documentation: https://learn.netdata.cloud/docs/get - -### Ask for logs - -Can you please send us the logs, as shown in the documentation? - -Don’t worry, we will get to the bottom of this! - -Documentation: https://learn.netdata.cloud/docs/agent/daemon - -### Update Netdata - -Finally, please make sure that you are running the latest version of Netdata. You can update it following the documentation. - -Documentation: https://learn.netdata.cloud/docs/agent/packaging/installer/update - -## Highlights - -### First PR - -Thanks for this! I see this is your first contribution to Netdata, so we thank you so much for this :) Welcome to the fam 🙇‍♂️ - -If you want to chat more about Netdata, make sure you join our forum at https://community.netdata.cloud - -## FAQ - -### Why Netdata is Free -It’s worth mentioning that Netdata is free, not only in regards to its open-source agent but also in regards to Netdata Cloud. It will remain free to some extent, although at this moment we can’t say more. You can read more about our decision on our blog. TLDR; We don’t sell data! 💪 - -blog post: https://www.netdata.cloud/blog/why-netdata-is-free/ - -### Do you store data? - -Any data collected by Netdata are collected and used for operational purposes and will not be sold or shared. Further, metrics data are only streamed to Cloud, only on demand (when a user is viewing a chart or dashboard), and never saved. Some operational Cloud metadata (such as dashboard configurations or chart configuration) are saved for operational purposes - -### Metric Correlations - -You could install Netdata and then use Netdata Cloud metric correlations feature. It's dead simple, you just underline the spike in the metric that concerns you and it will find the metrics that show aberrant behavior during the same time period as that spike. - -Although netdata auto-detects and auto-configures to gather data from every available data source, you will need to make sure that it monitors everything, so that whatever is causing that effect, it will be detected. - -Installation Documentation: https://learn.netdata.cloud/docs/get -Metric Correlations: https://www.netdata.cloud/blog/netdata-cloud-metric-correlations/ -NetdataAgent auto-detection: https://learn.netdata.cloud/guides/step-by-step/step-06 - -### Windows Support - -There is no Windows-native install package available at this point. However, WMI metrics and Prometheus metrics can be collected from Windows machines as long as Netdata runs on a Linux host and is properly configured. - -WMI: https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/wmi -Prometheus: https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/prometheus - -### On-Premise -We are considering on-premise, however, on-premise will not be available in 2020. Since we are focusing on improving Netdata Cloud usability first, we are not prepared to share any plans about when and if an on-premise version of Netdata would be available at this time. - From 77808949473fc4c4a592bb8ffb7dae73ed8dea35 Mon Sep 17 00:00:00 2001 From: odyslam Date: Fri, 20 Nov 2020 14:15:53 +0200 Subject: [PATCH 02/13] Initial readme for discourse --- Community/README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Community/README.md diff --git a/Community/README.md b/Community/README.md new file mode 100644 index 0000000..c3bc65b --- /dev/null +++ b/Community/README.md @@ -0,0 +1,43 @@ +# Community Forums + +The second iteration of Netdata's Community uses [Discourse](https://github.com/discourse/discourse). + +[Netdata Community](https://community.netdata.cloud) + +# Discourse setup + +## Hosting +Netdata Community is using the [hosted version](https://www.discourse.org/pricing) of Discourse. + +Hosted Discourse is identical to self-hosting, since the software is open-sourced, but it greatly simplifies the operational side. Since the developer relations team is small, we wanted to focus on user-facing issues and not technical. + +Moreover, hosted Discourse comes with private mail support, which is another feature that saves time. + +## Setup guide + +To setup the Discourse forum, we curated this [guide](https://github.com/OdysLam/devrel-resources/blob/main/Discourse.md), aided by a community of Developer Relations professionals. + + +# Components, Plugins + +- We are using the plugins that are described in the [Business plan](https://www.discourse.org/plugins#business). +- Login methods: + - Twitter + - Github + - Google Oauth +- Theme components: + - Main theme: https://github.com/netdata/discourse-netdata-theme + - Brand header: https://github.com/netdata/discourse-brand-header + - Easy footer: https://github.com/netdata/Discourse-easy-footer + - Google fonts: https://github.com/netdata/discourse-google-font-component + + +## Theme components + +We have forked the theme components so that we can apply some changes to their CSS, JS, HTML code. The end result is is visible on the Community forum. + +## Data explorer + +We are using the [Data Explorer Plugin](https://meta.discourse.org/t/data-explorer-plugin/32566) to extract insights and meaningful metrics about the community, directly from the forum PostgreSQL database. + +The queries can be found on the [Data Explorer queries](/community/Data-Explorer-queries) directory. From e952054ba35aba92ab78cbc78c35b9991b702e07 Mon Sep 17 00:00:00 2001 From: odyslam Date: Mon, 23 Nov 2020 17:52:44 +0200 Subject: [PATCH 03/13] Initial discourse source of truth --- Community/README.md | 92 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 80 insertions(+), 12 deletions(-) diff --git a/Community/README.md b/Community/README.md index c3bc65b..571c880 100644 --- a/Community/README.md +++ b/Community/README.md @@ -4,7 +4,7 @@ The second iteration of Netdata's Community uses [Discourse](https://github.com/ [Netdata Community](https://community.netdata.cloud) -# Discourse setup +# Discourse setupcd ## Hosting Netdata Community is using the [hosted version](https://www.discourse.org/pricing) of Discourse. @@ -17,27 +17,95 @@ Moreover, hosted Discourse comes with private mail support, which is another fea To setup the Discourse forum, we curated this [guide](https://github.com/OdysLam/devrel-resources/blob/main/Discourse.md), aided by a community of Developer Relations professionals. - # Components, Plugins +## Plugins + - We are using the plugins that are described in the [Business plan](https://www.discourse.org/plugins#business). - Login methods: - - Twitter - - Github - - Google Oauth -- Theme components: - - Main theme: https://github.com/netdata/discourse-netdata-theme - - Brand header: https://github.com/netdata/discourse-brand-header - - Easy footer: https://github.com/netdata/Discourse-easy-footer - - Google fonts: https://github.com/netdata/discourse-google-font-component + - Twitter: https://meta.discourse.org/t/configuring-twitter-login-and-rich-embeds-for-discourse/13395 + - Github: https://meta.discourse.org/t/configuring-github-login-for-discourse/13745 + - Google Oauth: https://meta.discourse.org/t/configuring-google-login-for-discourse/15858 +- Slack: https://meta.discourse.org/t/chatroom-integration-plugin-discourse-chat-integration/66522 ## Theme components We have forked the theme components so that we can apply some changes to their CSS, JS, HTML code. The end result is is visible on the Community forum. -## Data explorer +- Main theme: https://github.com/netdata/discourse-netdata-theme +- Brand header: https://github.com/netdata/discourse-brand-header +- Easy footer: https://github.com/netdata/Discourse-easy-footer +- Google fonts: https://github.com/netdata/discourse-google-font-component + + +## Logins + +To setup the social logins, we follow the instructions on the meta.discourse.org topic of each plugin, linked above. + +To retrieve the keys/secrets for each platform: +- Github: We contact the Netdata GitHub admins and request the information for the Community app in the developers page. + - Source: +- Twitter: We contact Marketing and ask for the information (available [here](https://developer.twitter.com/en/dashboard), via the @linuxnetdata account). +- Google: We contact the Netdata Gsuite administrator and request the credentials from the "Netdata Cloud" project. + +## Slack +- We have integrated Discourse into Slack. +- We have created an application in Slack called `Netdata Community` . Ask @odyslam for access information or create a new one following the instructions in the meta.discourse.org topic linked above. + +### Topics + +- Currently, we mirror the `support`, `support/netdata-agent` and `support/netdata-cloud` categories and subcategories respectively in the `#discourse-support` channel. This is to enable the engineers to easily hop into new topics from a platform that they are already using. + +## Data Explorer We are using the [Data Explorer Plugin](https://meta.discourse.org/t/data-explorer-plugin/32566) to extract insights and meaningful metrics about the community, directly from the forum PostgreSQL database. -The queries can be found on the [Data Explorer queries](/community/Data-Explorer-queries) directory. +The queries can be found in the [Data Explorer queries](/community/Data-Explorer-queries) directory. + +# Forum organization + +- Design choices of categories, subcategories +- Use of templates + +# Categories + +- Support + - Agent, Cloud +- Netdata Agent Development & Integrations +- Monitoring & Troubleshooting with Netdata +- Netdata Content +- Community Guides +- Feature Requests + - Agent, Cloud +- Community +- Sysadmin getaway +- Announcements & Roadmap + +# Customizations + +## Forum branding assets + +All the required assets exist on [Figma](https://www.figma.com/file/h1eC0Puk7HpMTUccF7OVXg/New-Forum-Assets?node-id=2%3A42). They are only accessible by Netdata members. + +## User fields + +We have added 2 user fields. `Company` to be able to better understand our users and `Newsletter` to subscribe to development news about Netdata. Both are opt-in. + +## Groups + +- Netdata team: Automatic addition of team members via the `@netdata.cloud` domain. Used to differentiate our staff inside the forum and to measure our support efficiency and interactions. +- WIP: + - MVP community members: A place of discussion for the most active community members. + - Maintainers: A place of discussion for the maintainers of the Netdata Agent packages in various Linux distributions. + - Close-testing: A place of discussion for a handful of users who take part in close-testing. + - Beta-testing: A place of discussion for the users who take part in public beta-testing. + + +## Hubspot + +We are using Hubspot to offer feedback surveys. In order to activate Hubspot, we need to: +1) Follow this [guide](https://knowledge.hubspot.com/customer-feedback/create-and-send-customer-satisfaction-surveys) to create the Hubspot survey. +2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist . + +The tracking code for hubspot is already integrated into the main Netdata theme, so we don't need to edit the theme. \ No newline at end of file From 725dc3735178cac13c1181bf21c647a425088f1b Mon Sep 17 00:00:00 2001 From: odyslam Date: Mon, 23 Nov 2020 17:55:51 +0200 Subject: [PATCH 04/13] sql queries --- ...tom-user-fields-for-all-users.dcquery (1).json | 15 +++++++++++++++ .../most-common-likers.dcquery (1).json | 15 +++++++++++++++ .../new-topics-per-category.dcquery (1).json | 1 + ...number-of-replies-by-category.dcquery (1).json | 1 + ...ved-count-by-netdata-team-monthly.dcquery.json | 1 + ...-non-netdata-team-members-monthly.dcquery.json | 1 + ...e-to-first-response-for-staff.dcquery (1).json | 1 + .../time-to-first-response.dcquery.json | 1 + .../time-to-resolution.dcquery.json | 1 + .../user-company.dcquery.json | 1 + .../user-newsletter.dcquery.json | 1 + ...user-participation-statistics.dcquery (1).json | 1 + 12 files changed, 40 insertions(+) create mode 100644 Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json create mode 100644 Community/Data Explorer queries/most-common-likers.dcquery (1).json create mode 100644 Community/Data Explorer queries/new-topics-per-category.dcquery (1).json create mode 100644 Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json create mode 100644 Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json create mode 100644 Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json create mode 100644 Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json create mode 100644 Community/Data Explorer queries/time-to-first-response.dcquery.json create mode 100644 Community/Data Explorer queries/time-to-resolution.dcquery.json create mode 100644 Community/Data Explorer queries/user-company.dcquery.json create mode 100644 Community/Data Explorer queries/user-newsletter.dcquery.json create mode 100644 Community/Data Explorer queries/user-participation-statistics.dcquery (1).json diff --git a/Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json b/Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json new file mode 100644 index 0000000..cff0635 --- /dev/null +++ b/Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json @@ -0,0 +1,15 @@ +{ + "query": { + "id": 11, + "sql": "WITH \n\nvw_user_custom_fields as\n(\nselect \n user_id as user_uid,\n name as custom_field_uid,\n value as custom_field_value\nfrom \n user_custom_fields \nwhere\n name like 'user_field%'\n),\n\nvw_user_fields as\n(\nselect \n concat('user_field_',id) as custom_field_uid,\n name as custom_field_name\nfrom \n user_fields\n)\n\nselect \n u.username,\n custom_field_name as key,\n custom_field_value as value\nfrom \n vw_user_custom_fields ucf\njoin\n vw_user_fields uf\non\n ucf.custom_field_uid = uf.custom_field_uid\njoin\n users u\non \n ucf.user_uid = u.id", + "name": "Get all custom user fields for all users", + "description": "", + "param_info": [], + "created_at": "2020-11-18T18:01:03.929Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:08.726Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/most-common-likers.dcquery (1).json b/Community/Data Explorer queries/most-common-likers.dcquery (1).json new file mode 100644 index 0000000..5c8460b --- /dev/null +++ b/Community/Data Explorer queries/most-common-likers.dcquery (1).json @@ -0,0 +1,15 @@ +{ + "query": { + "id": 8, + "sql": "WITH pairs AS (\n SELECT p.user_id liked, pa.user_id liker\n FROM post_actions pa\n LEFT JOIN posts p ON p.id = pa.post_id\n WHERE post_action_type_id = 2\n)\nSELECT liker liker_user_id, liked liked_user_id, count(*)\nFROM pairs\nGROUP BY liked, liker\nORDER BY count DESC\n", + "name": "Most Common Likers", + "description": "Which users like particular other users the most?", + "param_info": [], + "created_at": "2020-11-18T17:59:00.896Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:13.403Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json b/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json new file mode 100644 index 0000000..bac9505 --- /dev/null +++ b/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json @@ -0,0 +1 @@ +{"query":{"id":6,"sql":"-- [params]\n-- int :months_ago = 1\n\nWITH query_period as (\n SELECT\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\n t.category_id,\n count(1) as topic_count\nFROM topics t\nRIGHT JOIN query_period qp\n ON t.created_at >= qp.period_start\n AND t.created_at <= qp.period_end\nWHERE t.user_id > 0\n AND t.category_id IS NOT NULL\nGROUP BY t.category_id\nORDER BY topic_count DESC","name":"New topics per category","description":"Returns the number of new topics created in each category for a given month, ordered by topic_count. The query accepts a ‘months ago’ parameter, defaults to 0 to give the results for the current month.\n\n","param_info":[{"identifier":"months_ago","type":"int","default":"1","nullable":false}],"created_at":"2020-11-18T17:57:50.953Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:11.871Z","hidden":false,"user_id":233}} \ No newline at end of file diff --git a/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json b/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json new file mode 100644 index 0000000..2c5d06f --- /dev/null +++ b/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json @@ -0,0 +1 @@ +{"query":{"id":7,"sql":"-- [params]\n-- boolean :enable_null_category = false\n\nWITH post AS (SELECT\n id AS post_id,\n topic_id,\n EXTRACT(YEAR FROM created_at) AS year\nFROM posts\nWHERE post_type = 1\n AND deleted_at ISNULL\n AND post_number != 1)\n\nSELECT\n p.year,\n t.category_id AS id,\n c.name category,\n COUNT(p.post_id) AS qt\nFROM post p\nINNER JOIN topics t ON t.id = p.topic_id\nLEFT JOIN categories c ON c.id = t.category_id\nWHERE t.deleted_at ISNULL\n AND (:enable_null_category = true OR t.category_id NOTNULL)\nGROUP BY t.category_id, c.name, p.year\nORDER BY p.year DESC, qt DESC\n","name":"Number of replies by category","description":"List the number of replies by category.","param_info":[{"identifier":"enable_null_category","type":"boolean","default":"false","nullable":false}],"created_at":"2020-11-18T17:58:47.437Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:09.984Z","hidden":false,"user_id":233}} \ No newline at end of file diff --git a/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json b/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json new file mode 100644 index 0000000..c602785 --- /dev/null +++ b/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json @@ -0,0 +1 @@ +{"query":{"id":4,"sql":"-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC","name":"Solved count by Netdata Team (monthly)","description":"Count of topics solved by staff(defaults to last month).\nUse months_ago = 0 for current month\nNetdata team group is id=43\n\n","param_info":[{"identifier":"months_ago","type":"int","default":"1","nullable":false}],"created_at":"2020-11-18T17:57:12.864Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:11.945Z","hidden":false,"user_id":233}} \ No newline at end of file diff --git a/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json b/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json new file mode 100644 index 0000000..b317272 --- /dev/null +++ b/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json @@ -0,0 +1 @@ +{"query":{"id":2,"sql":"-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND NOT (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC","name":"Solved count by non netdata-team members (monthly)","description":"Count of topics solved by regular members (defaults to last month)\nNetdata team is group id 43\n\n","param_info":[{"identifier":"months_ago","type":"int","default":"1","nullable":false}],"created_at":"2020-11-18T17:56:15.316Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:08.877Z","hidden":false,"user_id":233}} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json b/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json new file mode 100644 index 0000000..4c6b205 --- /dev/null +++ b/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json @@ -0,0 +1 @@ +{"query":{"id":5,"sql":"SELECT AVG(t.days)::float AS \"Average business days to first response\"\nFROM (\n SELECT t.id, t.title, t.created_at, MIN(p.created_at) as \"first_reply_created_at\", (\n SELECT count(*) FILTER (\n WHERE d not in ('2019-04-11')\n AND extract('ISODOW' FROM d) < 6\n )\n FROM generate_series(t.created_at::timestamp::date\n , MIN(p.created_at)::timestamp::date\n , interval '1 day') as s(d)\n ) as \"days\"\n FROM topics t\n INNER JOIN posts p ON p.topic_id = t.id AND (\n CASE WHEN p.post_number = 1\n THEN p.via_email IS TRUE \n ELSE true \n END\n )\n WHERE t.archetype = 'private_message'\n AND t.id IN (\n SELECT topic_id FROM topic_allowed_groups\n WHERE group_id IN (SELECT id FROM groups WHERE name ilike 'netdata-team')\n )\n AND t.deleted_at IS NULL\n AND t.created_at::timestamp::date >= '2019-04-04'\n AND t.created_at::timestamp::date <= '2019-04-06'\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n GROUP BY t.id\n) t","name":"Time to first response for staff","description":"","param_info":[],"created_at":"2020-11-18T17:57:34.278Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:01.890Z","hidden":false,"user_id":233}} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-first-response.dcquery.json b/Community/Data Explorer queries/time-to-first-response.dcquery.json new file mode 100644 index 0000000..3a91abe --- /dev/null +++ b/Community/Data Explorer queries/time-to-first-response.dcquery.json @@ -0,0 +1 @@ +{"query":{"id":18,"sql":"SELECT t.id AS topic_id, AVG(t.hours)::float AS hours, t.created_at\nFROM (\n SELECT t.id, t.created_at::date AS created_at, EXTRACT(EPOCH FROM MIN(p.created_at) - t.created_at)::float / 3600.0 AS hours\n FROM topics t\n LEFT JOIN posts p ON p.topic_id = t.id\n WHERE t.archetype = 'regular'\n AND t.created_at > date '2020-11-18'\n AND t.deleted_at IS NULL\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n AND p.user_id != t.user_id\n AND p.post_type = 1\n GROUP BY t.id\n) t\nGROUP BY t.created_at, t.id\nORDER BY hours DESC","name":"Time to first response","description":"Since the new forum","param_info":[],"created_at":"2020-11-23T12:11:26.517Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:01.900Z","hidden":false,"user_id":233}} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-resolution.dcquery.json b/Community/Data Explorer queries/time-to-resolution.dcquery.json new file mode 100644 index 0000000..17d10b2 --- /dev/null +++ b/Community/Data Explorer queries/time-to-resolution.dcquery.json @@ -0,0 +1 @@ +{"query":{"id":19,"sql":"WITH table1 as (\nSELECT topics.id, topics.created_at, user_actions.target_topic_id, user_actions.created_at as solved_time \nfrom user_actions\nINNER JOIN topics\nON topics.id = target_topic_id\nWHERE user_actions.action_type = 15\n-- make sure it is from support categories\nAND (topics.category_id = 13 OR topics.category_id = 14 OR topics.category_id = 15)\n)\nSelect table1.id, \ntable1.solved_time::date - table1.created_at::date as solution_time\nfrom table1","name":"Time to resolution","description":"","param_info":[],"created_at":"2020-11-23T12:21:11.087Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:08.540Z","hidden":false,"user_id":233}} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-company.dcquery.json b/Community/Data Explorer queries/user-company.dcquery.json new file mode 100644 index 0000000..1cb5e0a --- /dev/null +++ b/Community/Data Explorer queries/user-company.dcquery.json @@ -0,0 +1 @@ +{"query":{"id":14,"sql":"\r\nWITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Company'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)","name":"user_company","description":"","param_info":[],"created_at":"2020-11-18T21:55:12.418Z","username":"andrewm4894","group_ids":[],"last_run_at":"2020-11-23T15:50:09.955Z","hidden":false,"user_id":263}} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-newsletter.dcquery.json b/Community/Data Explorer queries/user-newsletter.dcquery.json new file mode 100644 index 0000000..0ff88d5 --- /dev/null +++ b/Community/Data Explorer queries/user-newsletter.dcquery.json @@ -0,0 +1 @@ +{"query":{"id":15,"sql":"WITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Newsletter'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)","name":"user_newsletter","description":"","param_info":[],"created_at":"2020-11-18T21:57:00.419Z","username":"andrewm4894","group_ids":[],"last_run_at":"2020-11-23T15:53:21.895Z","hidden":false,"user_id":263}} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json b/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json new file mode 100644 index 0000000..09805f8 --- /dev/null +++ b/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json @@ -0,0 +1 @@ +{"query":{"id":9,"sql":"-- [params]\n-- int :from_days_ago = 0\n-- int :duration_days = 30\nWITH t AS (\n SELECT CURRENT_TIMESTAMP - ((:from_days_ago + :duration_days) * (INTERVAL '1 days')) AS START,\n CURRENT_TIMESTAMP - (:from_days_ago * (INTERVAL '1 days')) AS END\n),\npr AS (\n SELECT user_id, COUNT(1) AS visits,\n SUM(posts_read) AS posts_read\n FROM user_visits, t\n WHERE posts_read > 0\n AND visited_at > t.START\n AND visited_at < t.\n END\n GROUP BY\n user_id\n),\npc AS (\n SELECT user_id, COUNT(1) AS posts_created\n FROM posts, t\n WHERE\n created_at > t.START\n AND created_at < t.\n END\n GROUP BY\n user_id\n),\nttopics AS (\n SELECT user_id, posts_count\n FROM topics, t\n WHERE created_at > t.START\n AND created_at < t.\n END\n),\ntc AS (\n SELECT user_id, COUNT(1) AS topics_created\n FROM ttopics\n GROUP BY user_id\n),\ntwr AS (\n SELECT user_id, COUNT(1) AS topics_with_replies\n FROM ttopics\n WHERE posts_count > 1\n GROUP BY user_id\n),\ntv AS (\n SELECT user_id,\n COUNT(DISTINCT(topic_id)) AS topics_viewed\n FROM topic_views, t\n WHERE viewed_at > t.START\n AND viewed_at < t.\n END\n GROUP BY user_id\n),\nlikes AS (\n SELECT post_actions.user_id AS given_by_user_id,\n posts.user_id AS received_by_user_id\n FROM t,\n post_actions\n LEFT JOIN\n posts\n ON post_actions.post_id = posts.id\n WHERE\n post_actions.created_at > t.START\n AND post_actions.created_at < t.\n END\n AND post_action_type_id = 2\n),\nlg AS (\n SELECT given_by_user_id AS user_id,\n COUNT(1) AS likes_given\n FROM likes\n GROUP BY user_id\n),\nlr AS (\n SELECT received_by_user_id AS user_id,\n COUNT(1) AS likes_received\n FROM likes\n GROUP BY user_id\n),\ne AS (\n SELECT email, user_id\n FROM user_emails u\n WHERE u.PRIMARY = TRUE\n)\nSELECT\n pr.user_id,\n username,\n name,\n email,\n visits,\n COALESCE(topics_viewed, 0) AS topics_viewed,\n COALESCE(posts_read, 0) AS posts_read,\n COALESCE(posts_created, 0) AS posts_created,\n COALESCE(topics_created, 0) AS topics_created,\n COALESCE(topics_with_replies, 0) AS topics_with_replies,\n COALESCE(likes_given, 0) AS likes_given,\n COALESCE(likes_received, 0) AS likes_received\nFROM pr\nLEFT JOIN tv USING (user_id)\nLEFT JOIN pc USING (user_id)\nLEFT JOIN tc USING (user_id)\nLEFT JOIN twr USING (user_id)\nLEFT JOIN lg USING (user_id)\nLEFT JOIN lr USING (user_id)\nLEFT JOIN e USING (user_id)\nLEFT JOIN users ON pr.user_id = users.id\nORDER BY\n visits DESC,\n posts_read DESC,\n posts_created DESC\n","name":"User Participation Statistics","description":"Detailed statistics for the most active users.","param_info":[{"identifier":"from_days_ago","type":"int","default":"0","nullable":false},{"identifier":"duration_days","type":"int","default":"30","nullable":false}],"created_at":"2020-11-18T17:59:13.549Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:08.681Z","hidden":false,"user_id":233}} \ No newline at end of file From bb432f380ccedda98dbe4d89632b042e8b1d4275 Mon Sep 17 00:00:00 2001 From: odyslam Date: Mon, 23 Nov 2020 17:57:39 +0200 Subject: [PATCH 05/13] community crms --- Community/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Community/README.md b/Community/README.md index 571c880..ec69b23 100644 --- a/Community/README.md +++ b/Community/README.md @@ -108,4 +108,11 @@ We are using Hubspot to offer feedback surveys. In order to activate Hubspot, we 1) Follow this [guide](https://knowledge.hubspot.com/customer-feedback/create-and-send-customer-satisfaction-surveys) to create the Hubspot survey. 2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist . -The tracking code for hubspot is already integrated into the main Netdata theme, so we don't need to edit the theme. \ No newline at end of file +The tracking code for hubspot is already integrated into the main Netdata theme, so we don't need to edit the theme. + +# Community CRMs + +We are currently using 2 communityCRM to monitor the community and improve our tactical decision making. To re-activate the integrations, go to the platforms and follow the instructions in their respective integrations page. + +- SavannahHQ: https://savannahhq.com/ +- Orbit.love: https://app.orbit.love \ No newline at end of file From 7f2efe45d0324efcfa5fea0ddb544bad77f79366 Mon Sep 17 00:00:00 2001 From: odyslam Date: Mon, 23 Nov 2020 19:53:19 +0200 Subject: [PATCH 06/13] readme initial commit with discourse --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 01ad7b4..3ba73d6 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,14 @@ Open-source and building in public is in our DNA. Now for the Developer Relations team as well. +In this repository we intend to gradually open-source all the documentation that we use internally and we believe we can have in public domain. + +The goal is to showcase our approach in Developer Relations and enable cross-pollination of different teams and projects. The community has played an integral part in making Netdata what it is today, so we try to give back at every turn. + + +# Developer Relations Team + +- [Odysseas Lamtzidis](https://github.com/odyslam) + # Index -- [Engagement Handbook](/engagement-handbook.md) \ No newline at end of file +- [Community forums](/community/README.md) \ No newline at end of file From b863638c7fcbeb887dac902e2d7ea19246e43d6e Mon Sep 17 00:00:00 2001 From: odyslam Date: Tue, 24 Nov 2020 14:12:49 +0200 Subject: [PATCH 07/13] minor improvements --- .../new-topics-per-category.dcquery (1).json | 23 ++++++++++++- ...er-of-replies-by-category.dcquery (1).json | 23 ++++++++++++- ...count-by-netdata-team-monthly.dcquery.json | 23 ++++++++++++- ...-netdata-team-members-monthly.dcquery.json | 23 ++++++++++++- ...-first-response-for-staff.dcquery (1).json | 16 +++++++++- .../time-to-first-response.dcquery.json | 16 +++++++++- .../time-to-resolution.dcquery.json | 16 +++++++++- .../user-company.dcquery.json | 16 +++++++++- .../user-newsletter.dcquery.json | 16 +++++++++- ...-participation-statistics.dcquery (1).json | 29 ++++++++++++++++- Community/README.md | 32 +++++++++++++------ 11 files changed, 214 insertions(+), 19 deletions(-) diff --git a/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json b/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json index bac9505..45360b9 100644 --- a/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json +++ b/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json @@ -1 +1,22 @@ -{"query":{"id":6,"sql":"-- [params]\n-- int :months_ago = 1\n\nWITH query_period as (\n SELECT\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\n t.category_id,\n count(1) as topic_count\nFROM topics t\nRIGHT JOIN query_period qp\n ON t.created_at >= qp.period_start\n AND t.created_at <= qp.period_end\nWHERE t.user_id > 0\n AND t.category_id IS NOT NULL\nGROUP BY t.category_id\nORDER BY topic_count DESC","name":"New topics per category","description":"Returns the number of new topics created in each category for a given month, ordered by topic_count. The query accepts a ‘months ago’ parameter, defaults to 0 to give the results for the current month.\n\n","param_info":[{"identifier":"months_ago","type":"int","default":"1","nullable":false}],"created_at":"2020-11-18T17:57:50.953Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:11.871Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 6, + "sql": "-- [params]\n-- int :months_ago = 1\n\nWITH query_period as (\n SELECT\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\n t.category_id,\n count(1) as topic_count\nFROM topics t\nRIGHT JOIN query_period qp\n ON t.created_at >= qp.period_start\n AND t.created_at <= qp.period_end\nWHERE t.user_id > 0\n AND t.category_id IS NOT NULL\nGROUP BY t.category_id\nORDER BY topic_count DESC", + "name": "New topics per category", + "description": "Returns the number of new topics created in each category for a given month, ordered by topic_count. The query accepts a ‘months ago’ parameter, defaults to 0 to give the results for the current month.\n\n", + "param_info": [ + { + "identifier": "months_ago", + "type": "int", + "default": "1", + "nullable": false + } + ], + "created_at": "2020-11-18T17:57:50.953Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:11.871Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json b/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json index 2c5d06f..90614c1 100644 --- a/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json +++ b/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json @@ -1 +1,22 @@ -{"query":{"id":7,"sql":"-- [params]\n-- boolean :enable_null_category = false\n\nWITH post AS (SELECT\n id AS post_id,\n topic_id,\n EXTRACT(YEAR FROM created_at) AS year\nFROM posts\nWHERE post_type = 1\n AND deleted_at ISNULL\n AND post_number != 1)\n\nSELECT\n p.year,\n t.category_id AS id,\n c.name category,\n COUNT(p.post_id) AS qt\nFROM post p\nINNER JOIN topics t ON t.id = p.topic_id\nLEFT JOIN categories c ON c.id = t.category_id\nWHERE t.deleted_at ISNULL\n AND (:enable_null_category = true OR t.category_id NOTNULL)\nGROUP BY t.category_id, c.name, p.year\nORDER BY p.year DESC, qt DESC\n","name":"Number of replies by category","description":"List the number of replies by category.","param_info":[{"identifier":"enable_null_category","type":"boolean","default":"false","nullable":false}],"created_at":"2020-11-18T17:58:47.437Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:09.984Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 7, + "sql": "-- [params]\n-- boolean :enable_null_category = false\n\nWITH post AS (SELECT\n id AS post_id,\n topic_id,\n EXTRACT(YEAR FROM created_at) AS year\nFROM posts\nWHERE post_type = 1\n AND deleted_at ISNULL\n AND post_number != 1)\n\nSELECT\n p.year,\n t.category_id AS id,\n c.name category,\n COUNT(p.post_id) AS qt\nFROM post p\nINNER JOIN topics t ON t.id = p.topic_id\nLEFT JOIN categories c ON c.id = t.category_id\nWHERE t.deleted_at ISNULL\n AND (:enable_null_category = true OR t.category_id NOTNULL)\nGROUP BY t.category_id, c.name, p.year\nORDER BY p.year DESC, qt DESC\n", + "name": "Number of replies by category", + "description": "List the number of replies by category.", + "param_info": [ + { + "identifier": "enable_null_category", + "type": "boolean", + "default": "false", + "nullable": false + } + ], + "created_at": "2020-11-18T17:58:47.437Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:09.984Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json b/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json index c602785..b2f5af3 100644 --- a/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json +++ b/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json @@ -1 +1,22 @@ -{"query":{"id":4,"sql":"-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC","name":"Solved count by Netdata Team (monthly)","description":"Count of topics solved by staff(defaults to last month).\nUse months_ago = 0 for current month\nNetdata team group is id=43\n\n","param_info":[{"identifier":"months_ago","type":"int","default":"1","nullable":false}],"created_at":"2020-11-18T17:57:12.864Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:11.945Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 4, + "sql": "-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC", + "name": "Solved count by Netdata Team (monthly)", + "description": "Count of topics solved by staff(defaults to last month).\nUse months_ago = 0 for current month\nNetdata team group is id=43\n\n", + "param_info": [ + { + "identifier": "months_ago", + "type": "int", + "default": "1", + "nullable": false + } + ], + "created_at": "2020-11-18T17:57:12.864Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:11.945Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json b/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json index b317272..f1ba2e9 100644 --- a/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json +++ b/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json @@ -1 +1,22 @@ -{"query":{"id":2,"sql":"-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND NOT (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC","name":"Solved count by non netdata-team members (monthly)","description":"Count of topics solved by regular members (defaults to last month)\nNetdata team is group id 43\n\n","param_info":[{"identifier":"months_ago","type":"int","default":"1","nullable":false}],"created_at":"2020-11-18T17:56:15.316Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:08.877Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 2, + "sql": "-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND NOT (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC", + "name": "Solved count by non netdata-team members (monthly)", + "description": "Count of topics solved by regular members (defaults to last month)\nNetdata team is group id 43\n\n", + "param_info": [ + { + "identifier": "months_ago", + "type": "int", + "default": "1", + "nullable": false + } + ], + "created_at": "2020-11-18T17:56:15.316Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:08.877Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json b/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json index 4c6b205..f83a053 100644 --- a/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json +++ b/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json @@ -1 +1,15 @@ -{"query":{"id":5,"sql":"SELECT AVG(t.days)::float AS \"Average business days to first response\"\nFROM (\n SELECT t.id, t.title, t.created_at, MIN(p.created_at) as \"first_reply_created_at\", (\n SELECT count(*) FILTER (\n WHERE d not in ('2019-04-11')\n AND extract('ISODOW' FROM d) < 6\n )\n FROM generate_series(t.created_at::timestamp::date\n , MIN(p.created_at)::timestamp::date\n , interval '1 day') as s(d)\n ) as \"days\"\n FROM topics t\n INNER JOIN posts p ON p.topic_id = t.id AND (\n CASE WHEN p.post_number = 1\n THEN p.via_email IS TRUE \n ELSE true \n END\n )\n WHERE t.archetype = 'private_message'\n AND t.id IN (\n SELECT topic_id FROM topic_allowed_groups\n WHERE group_id IN (SELECT id FROM groups WHERE name ilike 'netdata-team')\n )\n AND t.deleted_at IS NULL\n AND t.created_at::timestamp::date >= '2019-04-04'\n AND t.created_at::timestamp::date <= '2019-04-06'\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n GROUP BY t.id\n) t","name":"Time to first response for staff","description":"","param_info":[],"created_at":"2020-11-18T17:57:34.278Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:01.890Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 5, + "sql": "SELECT AVG(t.days)::float AS \"Average business days to first response\"\nFROM (\n SELECT t.id, t.title, t.created_at, MIN(p.created_at) as \"first_reply_created_at\", (\n SELECT count(*) FILTER (\n WHERE d not in ('2019-04-11')\n AND extract('ISODOW' FROM d) < 6\n )\n FROM generate_series(t.created_at::timestamp::date\n , MIN(p.created_at)::timestamp::date\n , interval '1 day') as s(d)\n ) as \"days\"\n FROM topics t\n INNER JOIN posts p ON p.topic_id = t.id AND (\n CASE WHEN p.post_number = 1\n THEN p.via_email IS TRUE \n ELSE true \n END\n )\n WHERE t.archetype = 'private_message'\n AND t.id IN (\n SELECT topic_id FROM topic_allowed_groups\n WHERE group_id IN (SELECT id FROM groups WHERE name ilike 'netdata-team')\n )\n AND t.deleted_at IS NULL\n AND t.created_at::timestamp::date >= '2019-04-04'\n AND t.created_at::timestamp::date <= '2019-04-06'\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n GROUP BY t.id\n) t", + "name": "Time to first response for staff", + "description": "", + "param_info": [], + "created_at": "2020-11-18T17:57:34.278Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:01.890Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-first-response.dcquery.json b/Community/Data Explorer queries/time-to-first-response.dcquery.json index 3a91abe..ffe9d5d 100644 --- a/Community/Data Explorer queries/time-to-first-response.dcquery.json +++ b/Community/Data Explorer queries/time-to-first-response.dcquery.json @@ -1 +1,15 @@ -{"query":{"id":18,"sql":"SELECT t.id AS topic_id, AVG(t.hours)::float AS hours, t.created_at\nFROM (\n SELECT t.id, t.created_at::date AS created_at, EXTRACT(EPOCH FROM MIN(p.created_at) - t.created_at)::float / 3600.0 AS hours\n FROM topics t\n LEFT JOIN posts p ON p.topic_id = t.id\n WHERE t.archetype = 'regular'\n AND t.created_at > date '2020-11-18'\n AND t.deleted_at IS NULL\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n AND p.user_id != t.user_id\n AND p.post_type = 1\n GROUP BY t.id\n) t\nGROUP BY t.created_at, t.id\nORDER BY hours DESC","name":"Time to first response","description":"Since the new forum","param_info":[],"created_at":"2020-11-23T12:11:26.517Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:01.900Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 18, + "sql": "SELECT t.id AS topic_id, AVG(t.hours)::float AS hours, t.created_at\nFROM (\n SELECT t.id, t.created_at::date AS created_at, EXTRACT(EPOCH FROM MIN(p.created_at) - t.created_at)::float / 3600.0 AS hours\n FROM topics t\n LEFT JOIN posts p ON p.topic_id = t.id\n WHERE t.archetype = 'regular'\n AND t.created_at > date '2020-11-18'\n AND t.deleted_at IS NULL\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n AND p.user_id != t.user_id\n AND p.post_type = 1\n GROUP BY t.id\n) t\nGROUP BY t.created_at, t.id\nORDER BY hours DESC", + "name": "Time to first response", + "description": "Since the new forum", + "param_info": [], + "created_at": "2020-11-23T12:11:26.517Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:01.900Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-resolution.dcquery.json b/Community/Data Explorer queries/time-to-resolution.dcquery.json index 17d10b2..4457b7a 100644 --- a/Community/Data Explorer queries/time-to-resolution.dcquery.json +++ b/Community/Data Explorer queries/time-to-resolution.dcquery.json @@ -1 +1,15 @@ -{"query":{"id":19,"sql":"WITH table1 as (\nSELECT topics.id, topics.created_at, user_actions.target_topic_id, user_actions.created_at as solved_time \nfrom user_actions\nINNER JOIN topics\nON topics.id = target_topic_id\nWHERE user_actions.action_type = 15\n-- make sure it is from support categories\nAND (topics.category_id = 13 OR topics.category_id = 14 OR topics.category_id = 15)\n)\nSelect table1.id, \ntable1.solved_time::date - table1.created_at::date as solution_time\nfrom table1","name":"Time to resolution","description":"","param_info":[],"created_at":"2020-11-23T12:21:11.087Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:08.540Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 19, + "sql": "WITH table1 as (\nSELECT topics.id, topics.created_at, user_actions.target_topic_id, user_actions.created_at as solved_time \nfrom user_actions\nINNER JOIN topics\nON topics.id = target_topic_id\nWHERE user_actions.action_type = 15\n-- make sure it is from support categories\nAND (topics.category_id = 13 OR topics.category_id = 14 OR topics.category_id = 15)\n)\nSelect table1.id, \ntable1.solved_time::date - table1.created_at::date as solution_time\nfrom table1", + "name": "Time to resolution", + "description": "", + "param_info": [], + "created_at": "2020-11-23T12:21:11.087Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:08.540Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-company.dcquery.json b/Community/Data Explorer queries/user-company.dcquery.json index 1cb5e0a..e291534 100644 --- a/Community/Data Explorer queries/user-company.dcquery.json +++ b/Community/Data Explorer queries/user-company.dcquery.json @@ -1 +1,15 @@ -{"query":{"id":14,"sql":"\r\nWITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Company'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)","name":"user_company","description":"","param_info":[],"created_at":"2020-11-18T21:55:12.418Z","username":"andrewm4894","group_ids":[],"last_run_at":"2020-11-23T15:50:09.955Z","hidden":false,"user_id":263}} \ No newline at end of file +{ + "query": { + "id": 14, + "sql": "\r\nWITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Company'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)", + "name": "user_company", + "description": "", + "param_info": [], + "created_at": "2020-11-18T21:55:12.418Z", + "username": "andrewm4894", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:09.955Z", + "hidden": false, + "user_id": 263 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-newsletter.dcquery.json b/Community/Data Explorer queries/user-newsletter.dcquery.json index 0ff88d5..d5c63ef 100644 --- a/Community/Data Explorer queries/user-newsletter.dcquery.json +++ b/Community/Data Explorer queries/user-newsletter.dcquery.json @@ -1 +1,15 @@ -{"query":{"id":15,"sql":"WITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Newsletter'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)","name":"user_newsletter","description":"","param_info":[],"created_at":"2020-11-18T21:57:00.419Z","username":"andrewm4894","group_ids":[],"last_run_at":"2020-11-23T15:53:21.895Z","hidden":false,"user_id":263}} \ No newline at end of file +{ + "query": { + "id": 15, + "sql": "WITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Newsletter'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)", + "name": "user_newsletter", + "description": "", + "param_info": [], + "created_at": "2020-11-18T21:57:00.419Z", + "username": "andrewm4894", + "group_ids": [], + "last_run_at": "2020-11-23T15:53:21.895Z", + "hidden": false, + "user_id": 263 + } +} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json b/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json index 09805f8..cd93596 100644 --- a/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json +++ b/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json @@ -1 +1,28 @@ -{"query":{"id":9,"sql":"-- [params]\n-- int :from_days_ago = 0\n-- int :duration_days = 30\nWITH t AS (\n SELECT CURRENT_TIMESTAMP - ((:from_days_ago + :duration_days) * (INTERVAL '1 days')) AS START,\n CURRENT_TIMESTAMP - (:from_days_ago * (INTERVAL '1 days')) AS END\n),\npr AS (\n SELECT user_id, COUNT(1) AS visits,\n SUM(posts_read) AS posts_read\n FROM user_visits, t\n WHERE posts_read > 0\n AND visited_at > t.START\n AND visited_at < t.\n END\n GROUP BY\n user_id\n),\npc AS (\n SELECT user_id, COUNT(1) AS posts_created\n FROM posts, t\n WHERE\n created_at > t.START\n AND created_at < t.\n END\n GROUP BY\n user_id\n),\nttopics AS (\n SELECT user_id, posts_count\n FROM topics, t\n WHERE created_at > t.START\n AND created_at < t.\n END\n),\ntc AS (\n SELECT user_id, COUNT(1) AS topics_created\n FROM ttopics\n GROUP BY user_id\n),\ntwr AS (\n SELECT user_id, COUNT(1) AS topics_with_replies\n FROM ttopics\n WHERE posts_count > 1\n GROUP BY user_id\n),\ntv AS (\n SELECT user_id,\n COUNT(DISTINCT(topic_id)) AS topics_viewed\n FROM topic_views, t\n WHERE viewed_at > t.START\n AND viewed_at < t.\n END\n GROUP BY user_id\n),\nlikes AS (\n SELECT post_actions.user_id AS given_by_user_id,\n posts.user_id AS received_by_user_id\n FROM t,\n post_actions\n LEFT JOIN\n posts\n ON post_actions.post_id = posts.id\n WHERE\n post_actions.created_at > t.START\n AND post_actions.created_at < t.\n END\n AND post_action_type_id = 2\n),\nlg AS (\n SELECT given_by_user_id AS user_id,\n COUNT(1) AS likes_given\n FROM likes\n GROUP BY user_id\n),\nlr AS (\n SELECT received_by_user_id AS user_id,\n COUNT(1) AS likes_received\n FROM likes\n GROUP BY user_id\n),\ne AS (\n SELECT email, user_id\n FROM user_emails u\n WHERE u.PRIMARY = TRUE\n)\nSELECT\n pr.user_id,\n username,\n name,\n email,\n visits,\n COALESCE(topics_viewed, 0) AS topics_viewed,\n COALESCE(posts_read, 0) AS posts_read,\n COALESCE(posts_created, 0) AS posts_created,\n COALESCE(topics_created, 0) AS topics_created,\n COALESCE(topics_with_replies, 0) AS topics_with_replies,\n COALESCE(likes_given, 0) AS likes_given,\n COALESCE(likes_received, 0) AS likes_received\nFROM pr\nLEFT JOIN tv USING (user_id)\nLEFT JOIN pc USING (user_id)\nLEFT JOIN tc USING (user_id)\nLEFT JOIN twr USING (user_id)\nLEFT JOIN lg USING (user_id)\nLEFT JOIN lr USING (user_id)\nLEFT JOIN e USING (user_id)\nLEFT JOIN users ON pr.user_id = users.id\nORDER BY\n visits DESC,\n posts_read DESC,\n posts_created DESC\n","name":"User Participation Statistics","description":"Detailed statistics for the most active users.","param_info":[{"identifier":"from_days_ago","type":"int","default":"0","nullable":false},{"identifier":"duration_days","type":"int","default":"30","nullable":false}],"created_at":"2020-11-18T17:59:13.549Z","username":"OdysLam","group_ids":[],"last_run_at":"2020-11-23T15:50:08.681Z","hidden":false,"user_id":233}} \ No newline at end of file +{ + "query": { + "id": 9, + "sql": "-- [params]\n-- int :from_days_ago = 0\n-- int :duration_days = 30\nWITH t AS (\n SELECT CURRENT_TIMESTAMP - ((:from_days_ago + :duration_days) * (INTERVAL '1 days')) AS START,\n CURRENT_TIMESTAMP - (:from_days_ago * (INTERVAL '1 days')) AS END\n),\npr AS (\n SELECT user_id, COUNT(1) AS visits,\n SUM(posts_read) AS posts_read\n FROM user_visits, t\n WHERE posts_read > 0\n AND visited_at > t.START\n AND visited_at < t.\n END\n GROUP BY\n user_id\n),\npc AS (\n SELECT user_id, COUNT(1) AS posts_created\n FROM posts, t\n WHERE\n created_at > t.START\n AND created_at < t.\n END\n GROUP BY\n user_id\n),\nttopics AS (\n SELECT user_id, posts_count\n FROM topics, t\n WHERE created_at > t.START\n AND created_at < t.\n END\n),\ntc AS (\n SELECT user_id, COUNT(1) AS topics_created\n FROM ttopics\n GROUP BY user_id\n),\ntwr AS (\n SELECT user_id, COUNT(1) AS topics_with_replies\n FROM ttopics\n WHERE posts_count > 1\n GROUP BY user_id\n),\ntv AS (\n SELECT user_id,\n COUNT(DISTINCT(topic_id)) AS topics_viewed\n FROM topic_views, t\n WHERE viewed_at > t.START\n AND viewed_at < t.\n END\n GROUP BY user_id\n),\nlikes AS (\n SELECT post_actions.user_id AS given_by_user_id,\n posts.user_id AS received_by_user_id\n FROM t,\n post_actions\n LEFT JOIN\n posts\n ON post_actions.post_id = posts.id\n WHERE\n post_actions.created_at > t.START\n AND post_actions.created_at < t.\n END\n AND post_action_type_id = 2\n),\nlg AS (\n SELECT given_by_user_id AS user_id,\n COUNT(1) AS likes_given\n FROM likes\n GROUP BY user_id\n),\nlr AS (\n SELECT received_by_user_id AS user_id,\n COUNT(1) AS likes_received\n FROM likes\n GROUP BY user_id\n),\ne AS (\n SELECT email, user_id\n FROM user_emails u\n WHERE u.PRIMARY = TRUE\n)\nSELECT\n pr.user_id,\n username,\n name,\n email,\n visits,\n COALESCE(topics_viewed, 0) AS topics_viewed,\n COALESCE(posts_read, 0) AS posts_read,\n COALESCE(posts_created, 0) AS posts_created,\n COALESCE(topics_created, 0) AS topics_created,\n COALESCE(topics_with_replies, 0) AS topics_with_replies,\n COALESCE(likes_given, 0) AS likes_given,\n COALESCE(likes_received, 0) AS likes_received\nFROM pr\nLEFT JOIN tv USING (user_id)\nLEFT JOIN pc USING (user_id)\nLEFT JOIN tc USING (user_id)\nLEFT JOIN twr USING (user_id)\nLEFT JOIN lg USING (user_id)\nLEFT JOIN lr USING (user_id)\nLEFT JOIN e USING (user_id)\nLEFT JOIN users ON pr.user_id = users.id\nORDER BY\n visits DESC,\n posts_read DESC,\n posts_created DESC\n", + "name": "User Participation Statistics", + "description": "Detailed statistics for the most active users.", + "param_info": [ + { + "identifier": "from_days_ago", + "type": "int", + "default": "0", + "nullable": false + }, + { + "identifier": "duration_days", + "type": "int", + "default": "30", + "nullable": false + } + ], + "created_at": "2020-11-18T17:59:13.549Z", + "username": "OdysLam", + "group_ids": [], + "last_run_at": "2020-11-23T15:50:08.681Z", + "hidden": false, + "user_id": 233 + } +} \ No newline at end of file diff --git a/Community/README.md b/Community/README.md index ec69b23..2a16bd6 100644 --- a/Community/README.md +++ b/Community/README.md @@ -43,11 +43,10 @@ We have forked the theme components so that we can apply some changes to their C To setup the social logins, we follow the instructions on the meta.discourse.org topic of each plugin, linked above. -To retrieve the keys/secrets for each platform: -- Github: We contact the Netdata GitHub admins and request the information for the Community app in the developers page. - - Source: -- Twitter: We contact Marketing and ask for the information (available [here](https://developer.twitter.com/en/dashboard), via the @linuxnetdata account). -- Google: We contact the Netdata Gsuite administrator and request the credentials from the "Netdata Cloud" project. +To retrieve the key/secret combination for each platform: +- Github: Netdata Community GitHub App. Contact @cakrit +- Twitter: Netdata Community project available at https://developer.twitter.com/en/dashboard. Contact @odyslam or the marketing team. +- Google: "Netdata Cloud" project. Contact @cakrit ## Slack @@ -61,12 +60,12 @@ To retrieve the keys/secrets for each platform: ## Data Explorer We are using the [Data Explorer Plugin](https://meta.discourse.org/t/data-explorer-plugin/32566) to extract insights and meaningful metrics about the community, directly from the forum PostgreSQL database. -The queries can be found in the [Data Explorer queries](/community/Data-Explorer-queries) directory. +The queries can be found in the [Data Explorer queries](/community/Data-Explorer-queries) directory and can be easily imported to the Data Explorer plugin. # Forum organization -- Design choices of categories, subcategories -- Use of templates +#TODO add forum copy +#TODO add link to community integrations page + explanation # Categories @@ -115,4 +114,19 @@ The tracking code for hubspot is already integrated into the main Netdata theme, We are currently using 2 communityCRM to monitor the community and improve our tactical decision making. To re-activate the integrations, go to the platforms and follow the instructions in their respective integrations page. - SavannahHQ: https://savannahhq.com/ -- Orbit.love: https://app.orbit.love \ No newline at end of file +- Orbit.love: https://app.orbit.love + +# Backups + +Hosted Discourse is automatically bucking up our instance. **To restore** a backup, we contact Discourse Support and make an official request for backup restore. + +To manually perform a backup and import it to a local instance (e.g staging for development), we follow the [official Discourse docs](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710). + +# Staging + +We are hosting a staging discourse instance for development reasons on staging.community.netdata.cloud. + +It is advised to use real-life data on staging, before importing the changes to the production instance. To do that, download a recent backup from production, restore the backup following the [documentation](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710) and finally test the changes. The backup import will create an identical clone of the hosted discourse instance. + +**Disclaimer:** +- In order for the import to function as expected, we need to have installed all the required plugins on the self-hosted Discourse instance. These plugins are automatically enabled on hosted, but they need to be manually installed on self-hosted. \ No newline at end of file From 6b2ed13e361a3fe222dfa6fea054ecae00bd48fc Mon Sep 17 00:00:00 2001 From: odyslam Date: Wed, 25 Nov 2020 14:09:18 +0200 Subject: [PATCH 08/13] update content security policy --- Community/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Community/README.md b/Community/README.md index 2a16bd6..a29378b 100644 --- a/Community/README.md +++ b/Community/README.md @@ -105,7 +105,7 @@ We have added 2 user fields. `Company` to be able to better understand our users We are using Hubspot to offer feedback surveys. In order to activate Hubspot, we need to: 1) Follow this [guide](https://knowledge.hubspot.com/customer-feedback/create-and-send-customer-satisfaction-surveys) to create the Hubspot survey. -2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist . +2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist. It is possible to disable entirely the policy. The tracking code for hubspot is already integrated into the main Netdata theme, so we don't need to edit the theme. From 4df1264a1000cad552e46ad92e20023afa924005 Mon Sep 17 00:00:00 2001 From: odyslam Date: Wed, 25 Nov 2020 15:59:38 +0200 Subject: [PATCH 09/13] add legal to discourse page --- Community/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Community/README.md b/Community/README.md index a29378b..4bb3e2f 100644 --- a/Community/README.md +++ b/Community/README.md @@ -129,4 +129,11 @@ We are hosting a staging discourse instance for development reasons on staging.c It is advised to use real-life data on staging, before importing the changes to the production instance. To do that, download a recent backup from production, restore the backup following the [documentation](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710) and finally test the changes. The backup import will create an identical clone of the hosted discourse instance. **Disclaimer:** -- In order for the import to function as expected, we need to have installed all the required plugins on the self-hosted Discourse instance. These plugins are automatically enabled on hosted, but they need to be manually installed on self-hosted. \ No newline at end of file +- In order for the import to function as expected, we need to have installed all the required plugins on the self-hosted Discourse instance. These plugins are automatically enabled on hosted, but they need to be manually installed on self-hosted. + + +# Legal + +- Terms of Service: https://www.netdata.cloud/terms/ +- Privacy Policy: https://www.netdata.cloud/privacy/ +- Code of Conduct: https://learn.netdata.cloud/contribute/code-of-conduct \ No newline at end of file From 06ca2a458613707738e64c715964b9500b7c9a13 Mon Sep 17 00:00:00 2001 From: odyslam Date: Wed, 25 Nov 2020 20:47:49 +0200 Subject: [PATCH 10/13] add hubspot wildcard mention --- Community/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Community/README.md b/Community/README.md index 4bb3e2f..bee0691 100644 --- a/Community/README.md +++ b/Community/README.md @@ -105,7 +105,8 @@ We have added 2 user fields. `Company` to be able to better understand our users We are using Hubspot to offer feedback surveys. In order to activate Hubspot, we need to: 1) Follow this [guide](https://knowledge.hubspot.com/customer-feedback/create-and-send-customer-satisfaction-surveys) to create the Hubspot survey. -2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist. It is possible to disable entirely the policy. +2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist. + 1) For the scripts with source `https://js.hs-analytics.net/*`, we use the wildcard instead of the specific source, because they keep changing sources. The tracking code for hubspot is already integrated into the main Netdata theme, so we don't need to edit the theme. From cc50e475064226ef61b48e6de68c8d8f4bf6436b Mon Sep 17 00:00:00 2001 From: odyslam Date: Tue, 1 Dec 2020 17:12:57 +0200 Subject: [PATCH 11/13] minor improvements; remove staging reference --- Community/README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Community/README.md b/Community/README.md index bee0691..25c1f95 100644 --- a/Community/README.md +++ b/Community/README.md @@ -4,7 +4,7 @@ The second iteration of Netdata's Community uses [Discourse](https://github.com/ [Netdata Community](https://community.netdata.cloud) -# Discourse setupcd +# Discourse setup ## Hosting Netdata Community is using the [hosted version](https://www.discourse.org/pricing) of Discourse. @@ -123,16 +123,6 @@ Hosted Discourse is automatically bucking up our instance. **To restore** a back To manually perform a backup and import it to a local instance (e.g staging for development), we follow the [official Discourse docs](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710). -# Staging - -We are hosting a staging discourse instance for development reasons on staging.community.netdata.cloud. - -It is advised to use real-life data on staging, before importing the changes to the production instance. To do that, download a recent backup from production, restore the backup following the [documentation](https://meta.discourse.org/t/create-download-and-restore-a-backup-of-your-discourse-database/122710) and finally test the changes. The backup import will create an identical clone of the hosted discourse instance. - -**Disclaimer:** -- In order for the import to function as expected, we need to have installed all the required plugins on the self-hosted Discourse instance. These plugins are automatically enabled on hosted, but they need to be manually installed on self-hosted. - - # Legal - Terms of Service: https://www.netdata.cloud/terms/ From b6a9b54fd28d0f022e2d0054a7901953ce66b689 Mon Sep 17 00:00:00 2001 From: odyslam Date: Tue, 1 Dec 2020 18:18:10 +0200 Subject: [PATCH 12/13] remove json form sql queries --- ...user-fields-for-all-users.dcquery (1).json | 15 ---------- .../most-common-likers.dcquery (1).json | 15 ---------- .../new-topics-per-category.dcquery (1).json | 22 --------------- ...er-of-replies-by-category.dcquery (1).json | 22 --------------- ...count-by-netdata-team-monthly.dcquery.json | 22 --------------- ...-netdata-team-members-monthly.dcquery.json | 22 --------------- ...-first-response-for-staff.dcquery (1).json | 15 ---------- .../time-to-first-response.dcquery.json | 15 ---------- .../time-to-resolution.dcquery.json | 15 ---------- .../user-company.dcquery.json | 15 ---------- .../user-newsletter.dcquery.json | 15 ---------- ...-participation-statistics.dcquery (1).json | 28 ------------------- 12 files changed, 221 deletions(-) delete mode 100644 Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json delete mode 100644 Community/Data Explorer queries/most-common-likers.dcquery (1).json delete mode 100644 Community/Data Explorer queries/new-topics-per-category.dcquery (1).json delete mode 100644 Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json delete mode 100644 Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json delete mode 100644 Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json delete mode 100644 Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json delete mode 100644 Community/Data Explorer queries/time-to-first-response.dcquery.json delete mode 100644 Community/Data Explorer queries/time-to-resolution.dcquery.json delete mode 100644 Community/Data Explorer queries/user-company.dcquery.json delete mode 100644 Community/Data Explorer queries/user-newsletter.dcquery.json delete mode 100644 Community/Data Explorer queries/user-participation-statistics.dcquery (1).json diff --git a/Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json b/Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json deleted file mode 100644 index cff0635..0000000 --- a/Community/Data Explorer queries/get-all-custom-user-fields-for-all-users.dcquery (1).json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "query": { - "id": 11, - "sql": "WITH \n\nvw_user_custom_fields as\n(\nselect \n user_id as user_uid,\n name as custom_field_uid,\n value as custom_field_value\nfrom \n user_custom_fields \nwhere\n name like 'user_field%'\n),\n\nvw_user_fields as\n(\nselect \n concat('user_field_',id) as custom_field_uid,\n name as custom_field_name\nfrom \n user_fields\n)\n\nselect \n u.username,\n custom_field_name as key,\n custom_field_value as value\nfrom \n vw_user_custom_fields ucf\njoin\n vw_user_fields uf\non\n ucf.custom_field_uid = uf.custom_field_uid\njoin\n users u\non \n ucf.user_uid = u.id", - "name": "Get all custom user fields for all users", - "description": "", - "param_info": [], - "created_at": "2020-11-18T18:01:03.929Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:08.726Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/most-common-likers.dcquery (1).json b/Community/Data Explorer queries/most-common-likers.dcquery (1).json deleted file mode 100644 index 5c8460b..0000000 --- a/Community/Data Explorer queries/most-common-likers.dcquery (1).json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "query": { - "id": 8, - "sql": "WITH pairs AS (\n SELECT p.user_id liked, pa.user_id liker\n FROM post_actions pa\n LEFT JOIN posts p ON p.id = pa.post_id\n WHERE post_action_type_id = 2\n)\nSELECT liker liker_user_id, liked liked_user_id, count(*)\nFROM pairs\nGROUP BY liked, liker\nORDER BY count DESC\n", - "name": "Most Common Likers", - "description": "Which users like particular other users the most?", - "param_info": [], - "created_at": "2020-11-18T17:59:00.896Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:13.403Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json b/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json deleted file mode 100644 index 45360b9..0000000 --- a/Community/Data Explorer queries/new-topics-per-category.dcquery (1).json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "query": { - "id": 6, - "sql": "-- [params]\n-- int :months_ago = 1\n\nWITH query_period as (\n SELECT\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\n date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\n t.category_id,\n count(1) as topic_count\nFROM topics t\nRIGHT JOIN query_period qp\n ON t.created_at >= qp.period_start\n AND t.created_at <= qp.period_end\nWHERE t.user_id > 0\n AND t.category_id IS NOT NULL\nGROUP BY t.category_id\nORDER BY topic_count DESC", - "name": "New topics per category", - "description": "Returns the number of new topics created in each category for a given month, ordered by topic_count. The query accepts a ‘months ago’ parameter, defaults to 0 to give the results for the current month.\n\n", - "param_info": [ - { - "identifier": "months_ago", - "type": "int", - "default": "1", - "nullable": false - } - ], - "created_at": "2020-11-18T17:57:50.953Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:11.871Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json b/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json deleted file mode 100644 index 90614c1..0000000 --- a/Community/Data Explorer queries/number-of-replies-by-category.dcquery (1).json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "query": { - "id": 7, - "sql": "-- [params]\n-- boolean :enable_null_category = false\n\nWITH post AS (SELECT\n id AS post_id,\n topic_id,\n EXTRACT(YEAR FROM created_at) AS year\nFROM posts\nWHERE post_type = 1\n AND deleted_at ISNULL\n AND post_number != 1)\n\nSELECT\n p.year,\n t.category_id AS id,\n c.name category,\n COUNT(p.post_id) AS qt\nFROM post p\nINNER JOIN topics t ON t.id = p.topic_id\nLEFT JOIN categories c ON c.id = t.category_id\nWHERE t.deleted_at ISNULL\n AND (:enable_null_category = true OR t.category_id NOTNULL)\nGROUP BY t.category_id, c.name, p.year\nORDER BY p.year DESC, qt DESC\n", - "name": "Number of replies by category", - "description": "List the number of replies by category.", - "param_info": [ - { - "identifier": "enable_null_category", - "type": "boolean", - "default": "false", - "nullable": false - } - ], - "created_at": "2020-11-18T17:58:47.437Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:09.984Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json b/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json deleted file mode 100644 index b2f5af3..0000000 --- a/Community/Data Explorer queries/solved-count-by-netdata-team-monthly.dcquery.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "query": { - "id": 4, - "sql": "-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC", - "name": "Solved count by Netdata Team (monthly)", - "description": "Count of topics solved by staff(defaults to last month).\nUse months_ago = 0 for current month\nNetdata team group is id=43\n\n", - "param_info": [ - { - "identifier": "months_ago", - "type": "int", - "default": "1", - "nullable": false - } - ], - "created_at": "2020-11-18T17:57:12.864Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:11.945Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json b/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json deleted file mode 100644 index f1ba2e9..0000000 --- a/Community/Data Explorer queries/solved-count-by-non-netdata-team-members-monthly.dcquery.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "query": { - "id": 2, - "sql": "-- [params]\n-- int :months_ago = 1\n\nWITH query_period AS (\nSELECT\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,\ndate_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end\n)\n\nSELECT\nua.user_id,\ncount(1) AS solved_count\nFROM user_actions ua\nINNER JOIN query_period qp\nON ua.created_at >= qp.period_start\nAND ua.created_at <= qp.period_end\nINNER JOIN users u\nON u.id = ua.user_id\nWHERE ua.action_type = 15\nAND NOT (u.primary_group_id = 43)\nGROUP BY ua.user_id\nORDER BY solved_count DESC", - "name": "Solved count by non netdata-team members (monthly)", - "description": "Count of topics solved by regular members (defaults to last month)\nNetdata team is group id 43\n\n", - "param_info": [ - { - "identifier": "months_ago", - "type": "int", - "default": "1", - "nullable": false - } - ], - "created_at": "2020-11-18T17:56:15.316Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:08.877Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json b/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json deleted file mode 100644 index f83a053..0000000 --- a/Community/Data Explorer queries/time-to-first-response-for-staff.dcquery (1).json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "query": { - "id": 5, - "sql": "SELECT AVG(t.days)::float AS \"Average business days to first response\"\nFROM (\n SELECT t.id, t.title, t.created_at, MIN(p.created_at) as \"first_reply_created_at\", (\n SELECT count(*) FILTER (\n WHERE d not in ('2019-04-11')\n AND extract('ISODOW' FROM d) < 6\n )\n FROM generate_series(t.created_at::timestamp::date\n , MIN(p.created_at)::timestamp::date\n , interval '1 day') as s(d)\n ) as \"days\"\n FROM topics t\n INNER JOIN posts p ON p.topic_id = t.id AND (\n CASE WHEN p.post_number = 1\n THEN p.via_email IS TRUE \n ELSE true \n END\n )\n WHERE t.archetype = 'private_message'\n AND t.id IN (\n SELECT topic_id FROM topic_allowed_groups\n WHERE group_id IN (SELECT id FROM groups WHERE name ilike 'netdata-team')\n )\n AND t.deleted_at IS NULL\n AND t.created_at::timestamp::date >= '2019-04-04'\n AND t.created_at::timestamp::date <= '2019-04-06'\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n GROUP BY t.id\n) t", - "name": "Time to first response for staff", - "description": "", - "param_info": [], - "created_at": "2020-11-18T17:57:34.278Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:01.890Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-first-response.dcquery.json b/Community/Data Explorer queries/time-to-first-response.dcquery.json deleted file mode 100644 index ffe9d5d..0000000 --- a/Community/Data Explorer queries/time-to-first-response.dcquery.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "query": { - "id": 18, - "sql": "SELECT t.id AS topic_id, AVG(t.hours)::float AS hours, t.created_at\nFROM (\n SELECT t.id, t.created_at::date AS created_at, EXTRACT(EPOCH FROM MIN(p.created_at) - t.created_at)::float / 3600.0 AS hours\n FROM topics t\n LEFT JOIN posts p ON p.topic_id = t.id\n WHERE t.archetype = 'regular'\n AND t.created_at > date '2020-11-18'\n AND t.deleted_at IS NULL\n AND p.deleted_at IS NULL\n AND p.post_number > 1\n AND p.user_id != t.user_id\n AND p.post_type = 1\n GROUP BY t.id\n) t\nGROUP BY t.created_at, t.id\nORDER BY hours DESC", - "name": "Time to first response", - "description": "Since the new forum", - "param_info": [], - "created_at": "2020-11-23T12:11:26.517Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:01.900Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/time-to-resolution.dcquery.json b/Community/Data Explorer queries/time-to-resolution.dcquery.json deleted file mode 100644 index 4457b7a..0000000 --- a/Community/Data Explorer queries/time-to-resolution.dcquery.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "query": { - "id": 19, - "sql": "WITH table1 as (\nSELECT topics.id, topics.created_at, user_actions.target_topic_id, user_actions.created_at as solved_time \nfrom user_actions\nINNER JOIN topics\nON topics.id = target_topic_id\nWHERE user_actions.action_type = 15\n-- make sure it is from support categories\nAND (topics.category_id = 13 OR topics.category_id = 14 OR topics.category_id = 15)\n)\nSelect table1.id, \ntable1.solved_time::date - table1.created_at::date as solution_time\nfrom table1", - "name": "Time to resolution", - "description": "", - "param_info": [], - "created_at": "2020-11-23T12:21:11.087Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:08.540Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-company.dcquery.json b/Community/Data Explorer queries/user-company.dcquery.json deleted file mode 100644 index e291534..0000000 --- a/Community/Data Explorer queries/user-company.dcquery.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "query": { - "id": 14, - "sql": "\r\nWITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Company'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)", - "name": "user_company", - "description": "", - "param_info": [], - "created_at": "2020-11-18T21:55:12.418Z", - "username": "andrewm4894", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:09.955Z", - "hidden": false, - "user_id": 263 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-newsletter.dcquery.json b/Community/Data Explorer queries/user-newsletter.dcquery.json deleted file mode 100644 index d5c63ef..0000000 --- a/Community/Data Explorer queries/user-newsletter.dcquery.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "query": { - "id": 15, - "sql": "WITH ucf_name AS(\r\nSELECT\r\nCONCAT('user_field_', id) AS name\r\nFROM user_fields\r\nWHERE name = 'Newsletter'\r\n)\r\n\r\nSELECT\r\nu.id AS user_id,\r\nu.username AS username,\r\nucf.value\r\nFROM users u\r\nJOIN user_custom_fields ucf\r\nON ucf.user_id = u.id\r\nWHERE ucf.name = (SELECT name FROM ucf_name)", - "name": "user_newsletter", - "description": "", - "param_info": [], - "created_at": "2020-11-18T21:57:00.419Z", - "username": "andrewm4894", - "group_ids": [], - "last_run_at": "2020-11-23T15:53:21.895Z", - "hidden": false, - "user_id": 263 - } -} \ No newline at end of file diff --git a/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json b/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json deleted file mode 100644 index cd93596..0000000 --- a/Community/Data Explorer queries/user-participation-statistics.dcquery (1).json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "query": { - "id": 9, - "sql": "-- [params]\n-- int :from_days_ago = 0\n-- int :duration_days = 30\nWITH t AS (\n SELECT CURRENT_TIMESTAMP - ((:from_days_ago + :duration_days) * (INTERVAL '1 days')) AS START,\n CURRENT_TIMESTAMP - (:from_days_ago * (INTERVAL '1 days')) AS END\n),\npr AS (\n SELECT user_id, COUNT(1) AS visits,\n SUM(posts_read) AS posts_read\n FROM user_visits, t\n WHERE posts_read > 0\n AND visited_at > t.START\n AND visited_at < t.\n END\n GROUP BY\n user_id\n),\npc AS (\n SELECT user_id, COUNT(1) AS posts_created\n FROM posts, t\n WHERE\n created_at > t.START\n AND created_at < t.\n END\n GROUP BY\n user_id\n),\nttopics AS (\n SELECT user_id, posts_count\n FROM topics, t\n WHERE created_at > t.START\n AND created_at < t.\n END\n),\ntc AS (\n SELECT user_id, COUNT(1) AS topics_created\n FROM ttopics\n GROUP BY user_id\n),\ntwr AS (\n SELECT user_id, COUNT(1) AS topics_with_replies\n FROM ttopics\n WHERE posts_count > 1\n GROUP BY user_id\n),\ntv AS (\n SELECT user_id,\n COUNT(DISTINCT(topic_id)) AS topics_viewed\n FROM topic_views, t\n WHERE viewed_at > t.START\n AND viewed_at < t.\n END\n GROUP BY user_id\n),\nlikes AS (\n SELECT post_actions.user_id AS given_by_user_id,\n posts.user_id AS received_by_user_id\n FROM t,\n post_actions\n LEFT JOIN\n posts\n ON post_actions.post_id = posts.id\n WHERE\n post_actions.created_at > t.START\n AND post_actions.created_at < t.\n END\n AND post_action_type_id = 2\n),\nlg AS (\n SELECT given_by_user_id AS user_id,\n COUNT(1) AS likes_given\n FROM likes\n GROUP BY user_id\n),\nlr AS (\n SELECT received_by_user_id AS user_id,\n COUNT(1) AS likes_received\n FROM likes\n GROUP BY user_id\n),\ne AS (\n SELECT email, user_id\n FROM user_emails u\n WHERE u.PRIMARY = TRUE\n)\nSELECT\n pr.user_id,\n username,\n name,\n email,\n visits,\n COALESCE(topics_viewed, 0) AS topics_viewed,\n COALESCE(posts_read, 0) AS posts_read,\n COALESCE(posts_created, 0) AS posts_created,\n COALESCE(topics_created, 0) AS topics_created,\n COALESCE(topics_with_replies, 0) AS topics_with_replies,\n COALESCE(likes_given, 0) AS likes_given,\n COALESCE(likes_received, 0) AS likes_received\nFROM pr\nLEFT JOIN tv USING (user_id)\nLEFT JOIN pc USING (user_id)\nLEFT JOIN tc USING (user_id)\nLEFT JOIN twr USING (user_id)\nLEFT JOIN lg USING (user_id)\nLEFT JOIN lr USING (user_id)\nLEFT JOIN e USING (user_id)\nLEFT JOIN users ON pr.user_id = users.id\nORDER BY\n visits DESC,\n posts_read DESC,\n posts_created DESC\n", - "name": "User Participation Statistics", - "description": "Detailed statistics for the most active users.", - "param_info": [ - { - "identifier": "from_days_ago", - "type": "int", - "default": "0", - "nullable": false - }, - { - "identifier": "duration_days", - "type": "int", - "default": "30", - "nullable": false - } - ], - "created_at": "2020-11-18T17:59:13.549Z", - "username": "OdysLam", - "group_ids": [], - "last_run_at": "2020-11-23T15:50:08.681Z", - "hidden": false, - "user_id": 233 - } -} \ No newline at end of file From 9dfff8fdb0fbc61bde66eb7461daa4cd5e00f885 Mon Sep 17 00:00:00 2001 From: odyslam Date: Mon, 7 Dec 2020 14:38:50 +0200 Subject: [PATCH 13/13] last changes for alpha --- .../count_nd_all_months.sql | 0 .../count_non_nd_all_months.sql | 14 +++++++++++ .../time_to_resolution.sql | 17 +++++++++++++ Community/README.md | 25 ++++++++++++------- 4 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 Community/Data Explorer queries/count_nd_all_months.sql create mode 100644 Community/Data Explorer queries/count_non_nd_all_months.sql create mode 100644 Community/Data Explorer queries/time_to_resolution.sql diff --git a/Community/Data Explorer queries/count_nd_all_months.sql b/Community/Data Explorer queries/count_nd_all_months.sql new file mode 100644 index 0000000..e69de29 diff --git a/Community/Data Explorer queries/count_non_nd_all_months.sql b/Community/Data Explorer queries/count_non_nd_all_months.sql new file mode 100644 index 0000000..ddac3b3 --- /dev/null +++ b/Community/Data Explorer queries/count_non_nd_all_months.sql @@ -0,0 +1,14 @@ +SELECT +u.username, ua.user_id, +count(1) AS solved_count, +round(extract(week from ua.created_at)) as week, +date_trunc('week', ua.created_at) as week_timestamp +FROM user_actions ua +INNER JOIN users u +ON u.id = ua.user_id +WHERE ua.action_type = 15 +AND (u.primary_group_id IS NULL OR u.primary_group_id != 43) +GROUP BY ua.user_id, u.username, week, week_timestamp +ORDER BY solved_count DESC +-- ) +-- select CURRENT_DATE, SUM(table1.solved_count) from table1 \ No newline at end of file diff --git a/Community/Data Explorer queries/time_to_resolution.sql b/Community/Data Explorer queries/time_to_resolution.sql new file mode 100644 index 0000000..f7058af --- /dev/null +++ b/Community/Data Explorer queries/time_to_resolution.sql @@ -0,0 +1,17 @@ +WITH table1 as ( +SELECT topics.id, topics.created_at, user_actions.target_topic_id, user_actions.created_at as solved_time +from user_actions +INNER JOIN topics +ON topics.id = target_topic_id +WHERE user_actions.action_type = 15 +-- make sure it is from support categories +AND (topics.category_id = 13 OR topics.category_id = 14 OR topics.category_id = 15) +-- return only for solutions that were given this month +-- AND topics.created_at >= date_trunc('month', CURRENT_DATE) +) + +select extract(week from created_at) as week, +date_trunc('week', created_at) as week_timestamp, +AVG(extract (epoch from (table1.solved_time::timestamp - table1.created_at::timestamp) )/3600) as average_solution_time_hrs +from table1 +group by week, week_timestamp \ No newline at end of file diff --git a/Community/README.md b/Community/README.md index 25c1f95..fb6fc60 100644 --- a/Community/README.md +++ b/Community/README.md @@ -37,6 +37,7 @@ We have forked the theme components so that we can apply some changes to their C - Brand header: https://github.com/netdata/discourse-brand-header - Easy footer: https://github.com/netdata/Discourse-easy-footer - Google fonts: https://github.com/netdata/discourse-google-font-component +- Kanban theme component: https://github.com/discourse/discourse-kanban-theme ## Logins @@ -55,7 +56,9 @@ To retrieve the key/secret combination for each platform: ### Topics -- Currently, we mirror the `support`, `support/netdata-agent` and `support/netdata-cloud` categories and subcategories respectively in the `#discourse-support` channel. This is to enable the engineers to easily hop into new topics from a platform that they are already using. +- We mirror the `support`, `support/netdata-agent` and `support/netdata-cloud` categories and subcategories respectively in the `#discourse-support` channel. This is to enable the engineers to easily hop into new topics from a platform that they are already using. +- We mirror the `feature requests`, `feature requests/netdata agent feature requests` and `feature requests/netdata cloud feature requests` category and subcategories respectively in the `#discourse-feature-requests` channel. This is to enable the product team to easily keep track of feature requests. + ## Data Explorer We are using the [Data Explorer Plugin](https://meta.discourse.org/t/data-explorer-plugin/32566) to extract insights and meaningful metrics about the community, directly from the forum PostgreSQL database. @@ -64,9 +67,6 @@ The queries can be found in the [Data Explorer queries](/community/Data-Explorer # Forum organization -#TODO add forum copy -#TODO add link to community integrations page + explanation - # Categories - Support @@ -105,17 +105,24 @@ We have added 2 user fields. `Company` to be able to better understand our users We are using Hubspot to offer feedback surveys. In order to activate Hubspot, we need to: 1) Follow this [guide](https://knowledge.hubspot.com/customer-feedback/create-and-send-customer-satisfaction-surveys) to create the Hubspot survey. -2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist. - 1) For the scripts with source `https://js.hs-analytics.net/*`, we use the wildcard instead of the specific source, because they keep changing sources. +2) Follow this [guide](https://meta.discourse.org/t/hubspot-chat-integration/128777) and edit the `content security policy script src` whitelist. The list of urls that we will need to add are listed in the [Confluence page](https://netdata.atlassian.net/wiki/spaces/MAR/pages/534216808/Community+Forum+sensitive+data) of the Netdata forum, accessible only be the Netdata team. + +# Integrations + +The Community, serving as the centerpiece of the community, produces important data for both our community and our support process. As such, it is tightly integrated into Netdata's data warehouse and company CRM. + +You can read more about the integrations in the [Community Integrations](https://netdata.atlassian.net/wiki/spaces/MAR/pages/399343750/Community+Integrations) confluence page, which is only accessible by the Netdata team. + +- Contact @odyslam for specifics on the data strategy +- Contact @andrewm4894 for specifics on the implementation -The tracking code for hubspot is already integrated into the main Netdata theme, so we don't need to edit the theme. -# Community CRMs +## Community CRMs We are currently using 2 communityCRM to monitor the community and improve our tactical decision making. To re-activate the integrations, go to the platforms and follow the instructions in their respective integrations page. - SavannahHQ: https://savannahhq.com/ -- Orbit.love: https://app.orbit.love +- Orbit: https://app.orbit.love # Backups