Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Installing and Configuring Grafana on a Notebook Instance

Updated on 2024-12-26 GMT+08:00

Description

This section describes how to install and configure Grafana in ModelArts Standard notebook instances.

Prerequisites

  • A running CPU- or GPU-based notebook instance is available.
  • A terminal is opened.

Procedure

  1. Run the following commands in sequence in your terminal to download and install Grafana:
    mkdir -p /home/ma-user/work/grf
    cd /home/ma-user/work/grf
    wget https://dl.grafana.com/oss/release/grafana-9.1.6.linux-amd64.tar.gz
    tar -zxvf grafana-9.1.6.linux-amd64.tar.gz

  2. Register Grafana with jupyter-server-proxy.
    1. Run the following commands in your terminal:
      mkdir -p /home/ma-user/.local/etc/jupyter
      vi /home/ma-user/.local/etc/jupyter/jupyter_notebook_config.py

    1. In jupyter_notebook_config.py, add the following code, press Esc to exit, and type :wq to save the changes:
      c.ServerProxy.servers = {
        'grafana': {
          'command': ['/home/ma-user/work/grf/grafana-9.1.6/bin/grafana-server', '--homepath', '/home/ma-user/work/grf/grafana-9.1.6', 'web'],
          'timeout': 1800,
          'port': 3000
        }
      }
    NOTE:

    If jupyter_notebook_config.py (path: /home/ma-user/.local/etc/jupyter/jupyter_notebook_config.py) contains the c.ServerProxy.servers field, add the corresponding key-value pair.

  3. Modify the URL for accessing Grafana in JupyterLab.
    1. In the navigation pane on the left, open the vi /home/ma-user/work/grf/grafana-9.1.6/conf/defaults.ini file.
    1. Change the root_url and serve_from_sub_path fields in [server].
      Figure 1 Modifying the defaults.ini file

      In the file:

      • The value of root_url is in the format of https:{JupyterLab domain name}/{Instance ID}/grafana. You can obtain the domain name and instance ID from the address box of the JupyterLab page.

      • Set Serve_from_sub_path to true.
  4. Save the image of the notebook instance.
    1. Log in to the ModelArts console and choose Development Workspace > Notebook. In the notebook instance list, locate the target instance, and choose More > Save Image in the Operation column.

    1. In the Save Image dialog box, configure parameters. Click OK to save the image.
    1. The image will be saved as a snapshot, and it will take about 5 minutes. During this period of time, do not perform any operations on the instance.
    2. After the image is saved, the instance status changes to Running. Then, restart the notebook instance.
  5. Open the Grafana page.

    Open a browser window and type the value of root_url configured in 3 in the address box. If the Grafana login page is displayed, Grafana is installed and configured in the notebook instance. The default username and password for the first login are admin. After the login is successful, change the password as prompted.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback