Skip to content

Commit

Permalink
[blog] Archive version 4.7 into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
romainr committed Mar 7, 2021
1 parent fd817c1 commit e043e04
Show file tree
Hide file tree
Showing 18 changed files with 85 additions and 69 deletions.
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying

---
Expand Down
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying

---
Expand Down
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying
- Development

Expand Down
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying


Expand Down
Expand Up @@ -38,7 +38,8 @@ ampforwp-amp-on-off:
- default
categories:
- Administration
- Version 4.7
- Version 4
# - Version 4.7

---

Expand Down
Expand Up @@ -38,17 +38,18 @@ ampforwp-amp-on-off:
- default
categories:
- Administration
- Version 4.7
- Version 4
# - Version 4.7

---


To understand the performance of Hue, we want to know how many active users in Hue--and more specifically--how many on each host. An active user is who sends requests from his/her browser to the Hue server in the last one hour. Recently, Hue got some improvements for providing and displaying better metrics.
To understand the performance of Hue, we want to know how many active users in Hue--and more specifically--how many on each host. An active user is who sends requests from his/her browser to the Hue server in the last one hour. Recently, Hue got some improvements for providing and displaying better metrics.

1. On premise, Hue is using [PyFormance](https://gethue.com/easier-administration-of-hue-with-the-new-threads-and-metrics-pages/) implements /desktop/metrics endpoint. Cloudera Manager collects data via the endpoint and displays the metric “Active Users” in the Charts Library, but all hosts show the same number of active users. With [HUE-9210](https://issues.cloudera.org/browse/HUE-9210), the active users metric on each host is collected based on its hostname (see screenshot).
1. On premise, Hue is using [PyFormance](https://gethue.com/easier-administration-of-hue-with-the-new-threads-and-metrics-pages/) implements /desktop/metrics endpoint. Cloudera Manager collects data via the endpoint and displays the metric “Active Users” in the Charts Library, but all hosts show the same number of active users. With [HUE-9210](https://issues.cloudera.org/browse/HUE-9210), the active users metric on each host is collected based on its hostname (see screenshot).

![cm_active_users.png](https://cdn.gethue.com/uploads/2020/04/cm_active_users.png)

Here we can see three users on the blue Hue API server role and one on the green

2. In Kubernetes, Hue is using [django-prometheus](https://gethue.com/collecting-hue-metrics-with-prometheus-in-kubernetes/) to implement endpoint /metrics. With [HUE-9194](https://issues.cloudera.org/browse/HUE-9194), we added two new active users metrics to display in Prometheus server. You may [set up your Prometheus server](https://gethue.com/set-up-prometheus-server-without-kubernetes/) without Kubernetes. Once setup is done and the server is started, open your browser at localhost:9090. From the drop down menu of metrics, you may find hue_active_users and hue_local_active_users.
Expand Down
Expand Up @@ -38,7 +38,8 @@ ampforwp-amp-on-off:
- default
categories:
- Administration
- Version 4.7
- Version 4
# - Version 4.7

---

Expand All @@ -47,102 +48,102 @@ To taste Hue prometheus metrics, you may set up a Prometheus server to scrape th
**Prerequisites**: a Hue server running at localhost:8000.

1. Create a service user

```console
$ sudo useradd --no-create-home --shell /bin/false prometheus
```
2. Create a directory in /etc for Prometheus’ configuration files and a directory in /var/lib for its data

```console
$ sudo mkdir /etc/prometheus
$ sudo mkdir /var/lib/prometheus
```
3. Set the user and group ownership on the new directories to the prometheus user

```console
$ sudo chown prometheus:prometheus /etc/prometheus
$ sudo chown prometheus:prometheus /var/lib/prometheus
```
4. Download Prometheus binary from [https://prometheus.io/download/](https://prometheus.io/download/)

```console
$ cd ~/Downloads
$ curl -LO https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz
```
5. Validate checksum value with download

```console
$ Sha256sum prometheus-2.16.0.linux-amd64.tar.gz
$ Sha256sum prometheus-2.16.0.linux-amd64.tar.gz
```
6. Unpack the downloaded archive
6. Unpack the downloaded archive

```console
$ tar xvf prometheus-2.16.0.linux-amd64.tar.gz
```
7. Copy the two binaries to the /usr/local/bin directory

```console
$ sudo cp prometheus-2.16.0.linux-amd64/prometheus /usr/local/bin/
$ sudo cp prometheus-2.16.0.linux-amd64/promtool /usr/local/bin/
```
8. Copy the consoles and console_libraries directories to /etc/prometheus.

```console
$ sudo cp -r prometheus-2.16.0.linux-amd64/consoles /etc/prometheus
$ sudo cp -r prometheus-2.16.0.linux-amd64/console_libraries /etc/prometheus
```
9. Set the user and group ownership on the directories to the prometheus user. Using the -R flag will ensure that ownership is set on the files inside the directory as well.

```console
$ sudo chown -R prometheus:prometheus /etc/prometheus/consoles
$ sudo chown -R prometheus:prometheus /etc/prometheus/console_libraries
```
10. Remove the leftover files from your downloads folder

```console
$ rm -rf prometheus-2.16.0.linux-amd64.tar.gz prometheus-2.16.0.linux-amd64
```
11. Create a configuration file named prometheus.yml

```console
$ vi /etc/prometheus/prometheus.yml
```

Content of prometheus.yml, port 8000 is your Hue server port, and change it if needed.

```console
global:
scrape_interval: 15s

scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']

- job_name: 'hue'
scrape_interval: 5s
static_configs:
- targets: ['localhost:8000']
```
12. Set the user and group ownership on the configuration file to the prometheus user

```console
$ sudo chown prometheus:prometheus /etc/prometheus/prometheus.yml
```
13. Create a new systemd service file.

```console
$ vi /etc/systemd/system/prometheus.service
```
Content of service file

```console
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Group=prometheus
Expand All @@ -152,12 +153,12 @@ To taste Hue prometheus metrics, you may set up a Prometheus server to scrape th
--storage.tsdb.path /var/lib/prometheus/ \
--web.console.templates=/etc/prometheus/consoles \
--web.console.libraries=/etc/prometheus/console_libraries

[Install]
WantedBy=multi-user.target
```
14. To use the newly created service, reload and start systemd.

```console
$ sudo systemctl daemon-reload
$ sudo systemctl start prometheus
Expand All @@ -170,4 +171,3 @@ Any feedback or questions? Feel free to comment here or on the [Forum](https://d


Ying Chen from the Hue Team

Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Administration

---
Expand Down
3 changes: 2 additions & 1 deletion docs/gethue/content/en/posts/2020-04-10-release-hue-4-7.md
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Release

---
Expand Down
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying

---
Expand Down
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying

---
Expand Down Expand Up @@ -211,7 +212,7 @@ FROM句に複数のテーブル(派生テーブルや結合済みのテーブル

**スマートなキーワードの補完**

オートコンプリーターは、ステートメント内のカーソルの位置に基づいてキーワードを提案します。可能であれば、IF NOT EXISTS のように一度に複数の単語を提案することもあります。誰もたくさん入力したくないでしょう?
オートコンプリーターは、ステートメント内のカーソルの位置に基づいてキーワードを提案します。可能であれば、IF NOT EXISTS のように一度に複数の単語を提案することもあります。誰もたくさん入力したくないでしょう?

**関数**

Expand Down Expand Up @@ -387,7 +388,7 @@ Google Document と同様に、クエリは他のユーザーやグループと
****: 一般向けのリンクと Gist での共有は、次の Hue 4.7 でリリースされる予定です!


## 次のステップ (SQL)
## 次のステップ (SQL)

2020 年に Hue 5 および拡張された SQL Cloud エディタが登場し、より新しいデータクエリ体験が実現します。[Cloudera Cloud Data Warehouse](https://www.cloudera.com/products/data-warehouse.html) では、データウェアハウス専用の Hue もリリースされました。

Expand Down
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying
- Development

Expand Down
Expand Up @@ -39,7 +39,8 @@ sf_remove_promo_bar:
ampforwp-amp-on-off:
- default
categories:
- Version 4.7
- Version 4
# - Version 4.7
- Querying


Expand Down
Expand Up @@ -38,7 +38,8 @@ ampforwp-amp-on-off:
- default
categories:
- Administration
- Version 4.7
- Version 4
# - Version 4.7

---

Expand Down
Expand Up @@ -38,7 +38,8 @@ ampforwp-amp-on-off:
- default
categories:
- Administration
- Version 4.7
- Version 4
# - Version 4.7

---

Expand All @@ -48,7 +49,7 @@ Hue のパフォーマンスを理解するために、Hue のアクティブユ
1. オンプレミスでは、Hue は [PyFormance](https://gethue.com/easier-administration-of-hue-with-the-new-threads-and-metrics-pages/) を使用して /desktop/metrics エンドポイントを実装しています。Cloudera Manager はエンドポイント経由でデータを収集し、チャートライブラリに「Active Users」メトリクスを表示しますが、どのホストも同じ数のアクティブユーザーを表示しています。[HUE-9210](https://issues.cloudera.org/browse/HUE-9210) では、各ホストのアクティブユーザーのメトリクスは、ホスト名に基づいて収集されています。 (スクリーンショットを参照してください)

![cm_active_users.png](https://cdn.gethue.com/uploads/2020/04/cm_active_users.png)

ここでは、Hue API サーバーロールに青色の3人のユーザーと、別のサーバーロールに緑色の1人のユーザーがいることがわかります。

2. Kubernetesでは、Hue は [django-prometheus](https://gethue.com/collecting-hue-metrics-with-prometheus-in-kubernetes/) を使用してエンドポイント/メトリクスを実装しています。[HUE-9194](https://issues.cloudera.org/browse/HUE-9194) では、Prometheus サーバーに表示するための2つの新しいアクティブユーザーのメトリクスを追加しました。Kubernetes を使用せずに[Prometheus サーバーをセットアップ](https://gethue.com/set-up-prometheus-server-without-kubernetes/) しても構いません。設定が完了してサーバーが開始したら、ブラウザで localhost:9090 を開きます。メトリクスのドロップダウンメニューで hue_active_users と hue_local_active_users を見つけることができます。
Expand Down

0 comments on commit e043e04

Please sign in to comment.