Monitoring service migration guide
    • PDF

    Monitoring service migration guide

    • PDF

    Article Summary

    Available in Classic and VPC

    The Monitoring service, which was available in the Classic environment of NAVER Cloud Platform, will only be available until October 20, 2023. After October 19, 2023, monitoring of Server and Auto Scaling services in the Classic environment can only be performed with Cloud Insight, an integrated monitoring service of NAVER Cloud Platform.

    Use this guide to learn how to migrate the Monitoring to Cloud Insight. To avoid any disruption to your service, migrate it before October 19, 2023.

    Server(Classic)

    Monitoring and Cloud Insight install an Agent on the server to collect performance information. The Agents used by Monitoring and Cloud Insight are different and not compatible with each other. Therefore, you need to remove the Monitoring service's Agent from your existing server and install the Cloud Insight Agent according to the following guide.

    You don’t need to reboot the server for the migration.

    Caution

    It is not recommended to update the Agent on the Servers (Classic) in an Auto Scaling Group created in Auto Scaling (Classic).

    • Currently, Cloud Insight does not support monitoring and Policy execution for Auto Scaling (Classic).
    • Also, if you have a mix of the Monitoring and Cloud Insight Agents on the Servers (Classic) in an Auto Scaling Group, the performance information for the Auto Scaling Group will not work properly.
    • As a result, if you apply a Metric-based Auto Scaling Policy (for example, Scale Out if the group monitoring CPU Usage is greater than 50%) in an Auto Scaling Group, you might experience unexpected execution of the Auto Scaling Policy.

    The schedule for Cloud Insight's Auto Scaling (Classic) support and Agent updates for Server (Classic) in Auto Scaling Group will be announced separately.

    How to check the version of Agent installed on your server

    You can check whether the Agent for the Monitoring service is installed in the following way.
    If the Agent for the Monitoring service is installed, you will need to remove that Agent and install the Cloud Insight Agent to be able to monitor with Cloud Insight.

    Linux

    If you execute the following command to run the noms_nsight -start process, the Agent of Monitoring service is working and needs to be updated.

    #ps -ef | grep noms_nsight 
    

    Windows

    Check the status of the Windows service.

    • Check the service status of noms_nsight. If the service is running, the Agent of Monitoring service is working and needs to be updated.

    Removing Monitoring Agent and installing Cloud Insight Agent

    You can remove the Monitoring Agent and install the Cloud Insight Agent in the following way.

    Linux

    For the Linux environment, see the following:

    Deleting Monitoring Agent and installing Cloud Insight Agent
    The following describes how to delete the Monitoring Agent and install the Cloud Insight Agent.

    Save the content of the following script as a file inside your server and run the file. The entire process must be done with root privileges.

    % bash uninstall_nsight1_install_nsight2.sh
    
    Caution

    If you run the script with the sh command in ubuntu, bash syntax errors may occur. In this case, execute the bash command to run the script.

    Or you can download it as a file from the following path.

    uninstall_nsight1_install_nsight2.sh

    #!/bin/bash
    
    # variable
    if [ -f /etc/redhat-release ]; then
        OS=$( cat /etc/redhat-release | awk '{print $1}' )
        OS_MAJOR=$( cat /etc/redhat-release | grep -Po '(?<=release )\d+' )
    elif [ $( command -v lsb_release ) ]; then
        OS=$( lsb_release -i 2> /dev/null | awk '{print $3}' )
        OS_MAJOR=$( /bin/cat /etc/lsb-release | grep "DISTRIB_RELEASE" | cut -d '=' -f2 | cut -d '.' -f1 )
    fi
    
    if [ "$( dmidecode -s system-manufacturer )" == "Xen" ] || [ $(/usr/sbin/virt-what 2> /dev/null | grep -i -c xen) -ge 1 ] || [ -d /sys/bus/xen/devices/vif-0 ] || [ $(ps -ef |grep /usr/sbin/xe-daemon | grep -v grep | wc -l ) -ge 1 ]; then
        AGENT_DIR="/home1/nbpmon"
        if [ "$OS_MAJOR" = 12 ] || [ "$OS_MAJOR" = 6 ] || [ "$OS" = "Debian" ] ; then # eol
            AGENT_FILE="agent_controller_linux_ncp_eol.tar.gz"
        else
            AGENT_FILE="agent_controller_linux_ncp.tar.gz"
        fi
        AGENT_INSTALL_PARAMETER="pub-classic"
    else
        AGENT_DIR="/"
        if [ "$OS_MAJOR" = 12 ] || [ "$OS_MAJOR" = 6 ] || [ "$OS" = "Debian" ] ; then # eol
            AGENT_FILE="agent_controller_linux_pub_eol_bm.tar.gz"
        else
            AGENT_FILE="agent_controller_linux_pub_common_bm.tar.gz"
        fi
        AGENT_INSTALL_PARAMETER="classic"
    fi
    
    AGENT_INSTALLER="https://repo-nsight.ncloud.com/$AGENT_FILE"
    
    # rc.local modify
    function rc_local_remove() {
        RC_LOCAL=$( cat /etc/rc.local | grep nsight )
        if [ -n "$RC_LOCAL" ]; then
            sed --follow-symlinks -i '/nsight/d' /etc/rc.local
            echo
            echo "Delete nsight_updater in /etc/rc.local >> Success"
            echo
        fi
    }
    
    # nsight service remove
    function nsight_remove() {
        [ -f /home1/nbpmon/noms/nsight/bin/noms_nsight ] && /home1/nbpmon/noms/nsight/bin/noms_nsight -stop
        [ -f /etc/systemd/system/noms_nsight.service ] && systemctl stop noms_nsight.service
        [ -f /etc/systemd/system/noms_nsight.service ] && systemctl disable noms_nsight.service
        rm -rf /home1/nbpmon/noms
        [ -f /home1/nbpmon/nsight_agent_installer.bin ] && rm -f /home1/nbpmon/nsight_agent_installer.bin
        [ -f /home1/nbpmon/nsight_linux_agent_setup.sh ] && rm -f /home1/nbpmon/nsight_linux_agent_setup.sh
        [ -f /home1/nbpmon/nsight_agent_installer.bin.backup ] && rm -f /home1/nbpmon/nsight_agent_installer.bin.backup
        [ -f /home1/nbpmon/nsight_linux_agent_setup.sh.backup ] && rm -f /home1/nbpmon/nsight_linux_agent_setup.sh.backup
        [ -f /etc/init.d/noms_nsight ] && rm -f /etc/init.d/noms_nsight
        [ -f /usr/sbin/nsight_updater ] && rm -f /usr/sbin/nsight_updater
        echo
        echo "Delete NSight Agent(V1) Files >> Success"
        echo
    }
    
    # nsight updater cronjob remove
    function nsight_updater_remove() {
        if [ $OS == "CentOS" ]; then
            sed -i '/nsight\|MAILTO/d' /var/spool/cron/root
            echo
            echo "Delete nsight_updater in crontab >> Success"
            echo
        elif [ $OS == "Ubuntu" ]; then
            sed -i '/nsight\|MAILTO/d' /var/spool/cron/crontabs/root
            echo
            echo "Delete nsight_updater in crontab >> Success"
            echo
        fi
    }
    
    
    # cloud insight install
    function cloud_insight_install() {
       if [ -d /home1/nbpmon/agent_controller_linux ]; then
           systemctl stop nsight-agent
           rm -rf /home1/nbpmon/agent_controller_linux
       fi
       wget -t 1 --timeout=5 --spider ${AGENT_INSTALLER} --no-check-certificate
       if [[ 0 -eq $? ]]; then
            wget -nv -t 1 --timeout=5 -O ${AGENT_DIR}/${AGENT_FILE} ${AGENT_INSTALLER} --no-check-certificate
            tar zxvf ${AGENT_DIR}/${AGENT_FILE} -C ${AGENT_DIR}
            bash ${AGENT_DIR}/agent_controller_linux/install_agent.sh ${AGENT_INSTALL_PARAMETER}
            echo
            echo "Install Cloud Insight(V3) Agent Files >> Success"
            echo
       fi
    }
    
    function cleansing() {
    
        local NOMS_NSIGHT="K01noms_nsight"
    
        REMOVE_FILE_LIST="$AGENT_DIR/$AGENT_FILE"
        for REMOVE_FILE in $REMOVE_FILE_LIST
        do
            rm -f $REMOVE_FILE
        done
    
        if [ $OS == "CentOS" ]; then
            for ((i=0; i<=6; i++))
            do
                rm -f /etc/rc.d/rc$i.d/$NOMS_NSIGHT
            done
        elif [ $OS == "Ubuntu" ]; then
            for ((i=0; i<=6; i++))
            do
                rm -f /etc/rc$i.d/$NOMS_NSIGHT
            done
        fi
    }
    
    # ====================
    # | Main Logic Start |
    # ====================
    rc_local_remove
    nsight_remove
    nsight_updater_remove
    cloud_insight_install
    cleansing
    

    Check normal operation
    Run the following command to verify that the Agent process is running.

    % ps -ef | grep agent
    

    If agent_updater.py, agent.py process is running, the Agent is functioning properly.
    Use Cloud Insight to confirm whether the Metric Data for the server is displayed.

    Windows

    For the Windows environment, see the following:

    Deleting Monitoring Agent and installing Cloud Insight Agent
    The following describes how to delete the Monitoring Agent and install the Cloud Insight Agent.

    1. How to use Powershell Script
    You can also download it as a file from the following path.
    uninstall_nsight1_install_nsight2.ps1

    Function Uninstall_Nsight()
    {
        # nsight uninstall
        if(Test-Path "C:\Program Files (x86)\NBP\NSight\uninst.exe") {
            Start-Process "C:\Program Files (x86)\NBP\NSight\uninst.exe" -PassThru -Verbose -NoNewWindow -Wait -ErrorAction Ignore
        }
    
        # Unregister - Nsight ScheduledTask
        if ($(Get-ScheduledTask -TaskName "nsight" -ErrorAction SilentlyContinue).TaskName -eq "nsight") {
            Unregister-ScheduledTask -TaskName "nsight" -Confirm:$False
        }
    }
    
    
    
    Function Install_CloudInsight()
    {
        if(!(Test-Path "C:\Program Files (x86)\NBP\agent_controller_windows\agent.bat")) {
            #Performance Table Restore
            Start-Process "C:\Windows\SysWOW64\lodctr.exe" -ArgumentList "/R"
            Invoke-WebRequest -uri https://repo-nsight.ncloud.com/agent_controller_windows_ncp.zip | Out-Null
    
            # Install CloudInsight
            if ((Get-CimInstance -ClassName Win32_BIOS).Manufacturer -eq 'Xen') {
                $nsight_source = "https://repo-nsight.ncloud.com/agent_controller_windows_ncp.zip"
                $nsight_opt = "/pub-classic"
                $wget = "C:\Windows\System32\wget.exe"
            }
    
            else {
                $nsight_source = "https://repo-nsight.ncloud.com/agent_controller_windows_pub_bm.zip"
                $nsight_opt = "/classic"
                $wget = "C:\Windows\System32\GroupPolicy\Machine\Scripts\startup\wget.exe"
            }
    
            if(!(Test-Path "C:\Program Files (x86)\NBP")) {
                New-Item "C:\Program Files (x86)\NBP" -ItemType Directory
            }
    
            $sourceFile = "C:\Program Files (x86)\NBP\agent_controller_windows.zip"
            $targetFile = 'C:\Program Files (x86)\NBP'
    
            Start-Process $wget -NoNewWindow -PassThru -Wait -ArgumentList "$nsight_source -q -O ""$sourceFile"" --no-check-certificate"
            $file = Get-ChildItem -Path $sourceFile
            $shell = new-object -com shell.application
            $destination = $shell.Namespace($targetFile)
            $zip = $shell.NameSpace($file.FullName)
            foreach($item in $zip.items()) {
                $destination.copyhere($item, 0x14)
            }
    
            Set-Location "$targetFile\agent_controller_windows"
            Start-Process "C:\Program Files (x86)\NBP\agent_controller_windows\install_agent.bat" -ArgumentList $nsight_opt -passthru -wait
            Remove-Item -Path $sourceFile -ErrorAction Ignore
        }
    }
    
    Uninstall_Nsight
    Install_CloudInsight
    

    2. How to perform manually

    Delete Monitoring Agent

    1. In Service, terminate the NOMS Nsight Service
       sc.exe stop noms_nsight
      
    2. Delete the C:\Program Files (x86)\NBP\NSight folder
    3. Remove nsight from the Task Scheduler
    4. Remove from the program
      sc.exe delete noms_nsight
      

    Install Cloud Insight Agent

    1. Move to the folder where you want to install the Agent: C:\Program Files (x86)\NBP
      If the folder does not exist, create it.
    2. Download the package to the above folder
      • VM :
        Copy and paste https://repo-nsight.ncloud.com/agent_controller_windows_ncp.zip into the browser to download the file
        
        or
        
        wget https://repo-nsight.ncloud.com/agent_controller_windows_ncp.zip --no-check-certificate 
        
      • Bare Metal
        Copy and paste https://repo-nsight.ncloud.com/agent_controller_windows_pub_bm.zip into the browser to download the file
        
        or
        
        wget https://repo-nsight.ncloud.com/agent_controller_windows_pub_bm.zip --no-check-certificate          
        
    3. Unzip the downloaded package file with the unzip command
    4. Move the agent_controller_windows folder under C:\Program Files (x86)\NBP
    5. Run the unzipped package file (be careful when entering Parameters after the executable file)
      • VM
        agent_controller_windows\install_agent.bat pub-classic
        
      • Bare Metal
        agent_controller_windows\install_agent.bat classic
        

    3. Check normal operation
    Check the status of the Windows service.

    • Check the service status of nsight2_agent. If the service is running, the Agent is functioning properly.

    Troubleshooting Cloud Insight Agent

    This document details problematic situations users may face while using Cloud Insight Agent, as well as their causes and resolutions.

    Q1. My server is hanging. Metric collection is not happening, and I am not getting notifications, either.

    A. When there is a server hang, the Agent does not work because it cannot get the CPU assigned. The problem may continue until the process causing the hang releases the hanged status on its own, or until you forcibly end the process. If you can't input anything to the server, then the server may need to be forcibly restarted. If a server is not working normally due to hangs or issues in the agent or network, use agent_status Metric from Server (Classic) or Server (VPC) to perform a check.

    Q2. The Agent is running properly, but no data is collected in Cloud Insight.

    A. The Outbound communication from Agent to Cloud Insight may be blocked due to reasons such as internal firewall settings of the server, installation of security solutions, and so on, even if the Agent is running normally. See the following Port list and check if the firewall is down.

    Classic environment

    SourceDestinationPortDescription
    Customer VM bandwidthreal-collector.nsight.ncloud.com (10.250.5.199)​​​​​​TCP 9973Cloud Insight metrics collection server
    Customer VM bandwidthreal-ntp.nsight.ncloud.com (10.250.5.117)​​​UDP 123Cloud Insight NTP server
    Customer VM bandwidthreal-wai.nsight.ncloud.com (10.250.5.118)​​​​​​TCP 10280Server to view information related to Cloud Insight
    Customer VM bandwidthrepo-nsight.ncloud.com (10.213.208.165)​​TCP 80,443Cloud Insight Repository server
    10.250.26.62Customer VM bandwidthICMPCloud Insight Ping Check monitoring server
    10.250.26.63Customer VM bandwidthICMPCloud Insight Ping Check monitoring server

    VPC environment

    SourceDestinationPortDescription
    Customer VM bandwidthcollector.nsight.ncloud.com (169.254.80.17)​​​TCP 9973Cloud Insight metrics collection server
    Customer VM bandwidthntp.nsight.ncloud.com (169.254.80.19)UDP 123Cloud Insight NTP server
    Customer VM bandwidthwai.nsight.ncloud.com (169.254.80.18)​​​TCP 10280Server to view information related to Cloud Insight
    Customer VM bandwidthnsight.ncloud.com (169.254.80.16)​​TCP 80,443Cloud Insight Repository server
    169.254.80.22Customer VM bandwidthICMPCloud Insight Ping Check monitoring server
    169.254.80.23Customer VM bandwidthICMPCloud Insight Ping Check monitoring server

    Q3. How do I stop or restart the Cloud Insight Agent?

    A. Depending on your operating system, check out the following methods to stop/start/restart the Agent.

    • Linux
      • Stop the Agent: run /home1/nbpmon/agent_controller_linux/stop_agent.sh.
      • Start the Agent: run /home1/nbpmon/agent_controller_linux/start_agent.sh.
      • Restart the Agent: run /home1/nbpmon/agent_controller_linux/restart_agent.sh.
    • Window
      • Stop the Agent: run C:\Program Files(x86)\NBP\agent_controller_windows\agent.bat stop.
      • Start the Agent: run C:\Program Files(x86)\NBP\agent_controller_windows\agent.bat start.

    Q4. How do I check the Agent's logs?

    A. Depending on your operating system, check out the following methods to stop/start/restart the Agent.

    • Linux: you can check log files in /home1/nbpmon/agent_controller_linux/logs.
    • Windows: you can check log files in C:\Program Files (x86)\NBP\agent_controller_windows\logs.

    Compare Metrics of Monitoring and Cloud Insight

    Observation, Observation Template

    This is a guide to Cloud Insight's response Metrics for each monitoring item that can be set up through Observation of the Monitoring service.

    CategoryMonitoringCloud Insight
    MetricTypeMetricDescription
    Ping FailPing FailServeris_on1 if server is alive, 0 otherwise
    Server time differenceServer time differenceServertime_deviationtime deviation with NTP server
    CPUused(%)Serveravg_cpu_used_rtoCPU Utilization Average
    idleServeravg_cpu_idle_rtoCPU idle ratio average (%)
    userServeravg_cpu_user_rtoCPU user ratio average (%)
    systemServeravg_cpu_sys_rto (Linux)CPU system ratio average (%)
    niceServeravg_nice_rto (Linux)CPU nice ratio average (%)
    irqServeravg_irq_rto (Linux)CPU interrupt ratio average (%)
    softirqServeravg_softirq_rto (Linux)CPU soft interrupt ratio average (%)
    iowaitServeravg_io_wait_rto (Linux)CPU IO wait ratio average (%)
    privildged timeServeravg_prv_mde_exec_tm_rto (Windows)CPU used ratio in the privileged mode
    dpc timeServeravg_dly_pcd_call_tm_rto (Windows)CPU used ratio for deferred procedure calls (DPCs) (%)
    interrupt timeServeravg_interrup_tm_rto (Windows)CPU used ratio for interrupts (%)
    processor timeNot supported
    Load AverageLoad average (1 minute)Serverload_average_1mCPU load 1 minute (%)
    Load average (5 minutes)Serverload_average_5mCPU load 5 minute average (%)
    Load average (15 minutes)Serverload_average_15mCPU load 15 minute average (%)
    Memoryused(%)Memorymem_usertMemory Utilization(%)
    totalMemorymem_mbtotal memory (MB)
    usedMemoryused_mem_mbused memory (MB)
    freeMemoryfree_mem_mbfree memory (MB)
    sharedMemoryshared_mem_mb (Linux)shared memory (MB)
    buffersMemorybffr_mb (Linux)buffers (MB)
    cachedMemorycache_mb (Linux)cache (MB)
    pgin/secMemorypgin_mbpage in (MB)
    pgout/secMemorypgout_mbpage out (MB)
    Swapused(%)Memoryswap_usertswap used ratio (%)
    totalMemoryswap_mbswap (MB)
    usedMemoryswap_used_mbswap used (MB)
    Diskread countServeravg_read_cntdisk read count per second average
    write countServeravg_write_cntdisk write count per second average
    read byteServeravg_read_byt_cntdisk read bytes average
    write byteServeravg_write_byt_cntdisk write bytes average
    File systemUsageFile Systemused_byt_cntused bytes
    Available capacityFile Systemfree_byt_cntfree bytes
    used(%)File Systemfs_usertFile System Utilization Average
    Mount statusFile Systemmnt_stat_cdmount state(1: mounted, 0: unmounted)
    iuse%File Systemind_usertinodes usage(Linux)
    NICcollisionNetworkclsn_packt_cnt (Linux)collisions packets
    bps inNetworkrcv_bpsreceive bits per second
    bps outNetworksnd_bpssend bits per second
    pps inNetworkrcv_ppsreceive packets per second
    pps outNetworksnd_ppssend packets per second
    error inNetworkrcv_fail_packt_cntreceive fail packets
    error outNetworksnd_fail_packt_cntsend fail packets
    Number of usersNumber of usersServeruser_cntuser count
    ProcessProcess downPlugin Processis_process_up1 if process is up, 0 otherwise
    Process countPlugin Processprocess_countProcess count (specified process)
    cpu(%)Plugin Processavg_cpu_usertprocess used Average
    mem(%)Plugin Processavg_mem_usertaverage memory usage %
    mem(KB)Plugin Processavg_mem_byt_cntmemory usage
    Thread countPlugin Processavg_thd_cntthread thread count
    Total process countServerproc_cntProcess count (server-wide)
    Process restartPlugin Processis_process_up1 if process is up, 0 otherwise
    Log observationFile logNot supported
    File observationChangePlugin Filefile_modified1: modified, 0: not modified
    SizePlugin Filefile_sizefile size(byte)
    Not changedPlugin Filefile_modified1: modified, 0: not modified
    File existencePlugin Filefile_exist1:file is exist, 0: file is not exist

    My Chart

    This is a guide to the corresponding Metrics of Cloud Insight for each item that can be added to My Chart in the Monitoring service.

    MonitoringCloud Insight
    CodeDescriptionTypeMetric
    avg.svr.cpu.used.rtoCPU UsedServeravg_cpu_used_rto
    avg.svr.cpu.idle.rtoCPU IdleServeravg_cpu_idle_rto
    avg.svr.cpu.user.rtoCPU UserServeravg_cpu_user_rto
    avg.svr.cpu.sys.rtoCPU SystemServeravg_cpu_sys_rto (Linux)
    avg.svr.io.wait.rtoCPU IO WaitServeravg_io_wait_rto (Linux)
    mi1.avg.ld.cntLoad 1MServerload_average_1m
    mi5.avg.ld.cntLoad 5MServerload_average_5m
    mi15.avg.ld.cntLoad 15MServerload_average_15m
    mem.usertMemory Used(%)Memorymem_usert
    used.mem.mbMemory UsedMemoryused_mem_mb
    free.mem.mbMemory FreeMemoryfree_mem_mb
    swap.usertSwap Used(%)Memoryswap_usert
    avg.svr.read.cntDisk Read CountServeravg_read_cnt
    avg.svr.write.cntDisk Write CountServeravg_write_cnt
    avg.svr.read.bytDisk IO ReadServeravg_read_byt_cnt
    avg.svr.write.bytDisk IO WriteServeravg_write_byt_cnt
    avg.svr.fs.usertFile System Used(%)Serveravg_fs_usert
    fs.used.mbFile System usageServerfs_used_mb
    fs.free.mbFile System availabilityServerfs_free_mb
    avg.svr.rcv.bpsNetwork Input (bps)Serveravg_rcv_bps
    avg.svr.snd.bpsNetwork Output (bps)Serveravg_snd_bps
    avg.svr.rcv.ppsNetwork Input (pps)Serveravg_rcv_pps
    avg.svr.snd.ppsNetwork Output (pps)Serveravg_snd_pps

    Items that can’t be migrated to Cloud Insight

    The Log monitoring feature provided through the Monitoring service is not available in Cloud Insight.
    You can use the Log monitoring feature through Cloud Log Analytics service.

    Cloud Log Analytics is an integrated log management platform service provided by NAVER Cloud Platform that can collect, analyze, and store various logs. For more information on Cloud Log Analytics and how to use it, see the following guides.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.