/
Dexter Monitor

Dexter Monitor





Dexter Monitor is a dashboard for monitoring the status of defects and users for all active Dexter Servers.

You need to download 'dexter-monitor' file to install dexter monitor.

And be sure to use the 'dexter-server'. You can download in "Dexter Download Page"



1.What you can do

  • Check Overview for Current installation/defect status (on real-time)

  • Check Dexter-Server Status [ Active / Inactive ]

  • Check Weekly Report ( 'dexter-monitor' creates a Snapshot for all ACTIVE dexter server automatically )


2.How to use

  2.1 Wrtie config.json file in dexter-monitor

config.json
{
    "version":"#.#.#",
    "appName":"Dexter Monitor",
    "description":"This program will monitor and control servers",
    "serverStatusCheckInterval":5,
    "serverDetailedStatusCheckInterval":5,
  	"serverRequestTimeout":5,
    "projectStatusRefreshInterval":60,
    "snapshotDayOfWeek":2,
    "email":{               
        "type":"api",
        "apiUrl":"http://dexter_email:5003/api/v1/email",
        "defaultSenderEmail":"min.ho.kim@samsung.com",
        "defaultSenderName":"MinHo Kim"
    },
    "database":{
        "host":"Database host Name or IP",
        "port": "Database Port Number",
        "user":"Database User ID",
        "password":"Database User Password",
        "name":"Database Name"
    },
    "userInfoUrl":"User info URL"
}
  • snapshotDayOfWeek : It creates a snapshot for all active servers at midnight on the specified day of week.

    • Default value(2) means midnight Tuesday(0: Sunday, ... , 6: Saturday)

  • email : It sends a email when there is a dexter-server error.But if you are Non-Samsung user, you should be implemented by yourself.
  • database : The Weekly defect, account status is saved on this databse. You need to check "2.2 Create Dexter Monitor Database". 
    • host: Database host ip
    • port : Database host port
    • user : Database user id
    • password : Database user password.
    • name : Database user
  • userInfoUrl : It returns  a User Information. But if you are Non-Samsung user, you should be implemented by yourself.
    • This URL should get userId as a query parameter and return the user information like the format below


  2.2 Create Dexter Monitor Database 

  • you need to download ddl script : 'dexter-monitor-db.sql' file using the mysql command line tool as follows.
  • Before using the following commands, you have to decide a databse user name and a password that will be used at dexter-monitor. ( : use for save Weekly Status, save Weekly Status Summary)
MySQL Example
Enter password:                                                        // <== enter your mysql password
 
mysql> create database Dexter_Weekly_Report;                           // <== choose any database name, But you must set same name on "database":"name" in'config.json'
Query OK, 1 row affected (0.00 sec)
 
mysql> use Dexter_Weekly_Report;                                       
Database changed	
 
mysql> create user 'dexter-user' identified by 'mypassword';           // <== choose any password, If you already have mysql account, you do not need to create new user.
Query OK, 0 rows affected (0.01 sec)

mysql> grant all on Dexter_Weekly_Report.* to 'dexter-user'@'localhost' identified by 'mypassword';
Query OK, 0 rows affected (0.00 sec)
 
mysql> source %DOWNLOAD_PATH%\dexter-monitor-db.sql   //  <== example : source D:\DexterSQL\dexter-monitor-db.sql
Query OK, 0 rows affected (0.04 sec)
Query OK, 0 rows affected (0.05 sec)
Query OK, 0 rows affected (0.04 sec)
Query OK, 0 rows affected (0.05 sec)
 
  • This is the sql for 'dexter-monitor' database. you can use the command Line. ex) "source dexter-monitor-db.sql' 
    • table Namedescription
      DexterUserList If SE want to check Dexter installation ratio at the real time, SE admin must be input the all of userId. dexter-monitor automatically search dexter users from all ACTIVE dexter-server and then mark 'Y' at dexterYn column. - reason/ ide/ language column : your Dexter installation being unnecessary developers.
      ProjectInfo If dexter-server  had created by SE, you must add project information in this table. This information is required to determine ACTIVE(available) dexter-server service. If you forget to save the project information in this table, you don't get dexter weekly status.
      WeeklyStatus 

      This table includes weekly status reports and the summary data by automatically. 

      If you set value(2) in snapshoDayOfWeek of config.json file, it will be create a snapshot data every Tuesday.

      WeeklyStatusSummary 
dexter-monitor-db.sql
CREATE TABLE `DexterUserList` (
  `listNumber` int(11) NOT NULL AUTO_INCREMENT,
  `userId` varchar(100) DEFAULT NULL,
  `userName` varchar(100) DEFAULT NULL,
  `userLab` varchar(100) DEFAULT NULL,
  `dexterYn` varchar(10) DEFAULT NULL,
  `reason` varchar(200) DEFAULT NULL,
  `ide` varchar(100) DEFAULT NULL,
  `language` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`listNumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `ProjectInfo` (
  `pid` int(11) NOT NULL AUTO_INCREMENT,
  `projectYear` int(11) NOT NULL,
  `projectType` varchar(100) NOT NULL,
  `projectName` varchar(100) NOT NULL,
  `requester` varchar(100) NOT NULL,
  `dbName` varchar(100) NOT NULL,
  `hostIP` varchar(100) NOT NULL,
  `portNumber` int(11) NOT NULL DEFAULT '0',
  `groupName` varchar(100) NOT NULL,
  `language` varchar(100) NOT NULL,
  `createdDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `administrator` varchar(100) DEFAULT NULL,
  `emailList` varchar(500) DEFAULT NULL,
  `emailingWhenServerDead` char(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `WeeklyStatus` (
  `wid` int(11) NOT NULL AUTO_INCREMENT,
  `pid` int(11) NOT NULL,
  `year` int(11) NOT NULL,
  `week` int(11) NOT NULL,
  `day` int(11) NOT NULL,
  `allDefectCount` int(11) NOT NULL DEFAULT '0',
  `allNew` int(11) NOT NULL DEFAULT '0',
  `allFix` int(11) NOT NULL DEFAULT '0',
  `allDis` int(11) DEFAULT NULL,
  `criNew` int(11) NOT NULL DEFAULT '0',
  `criFix` int(11) NOT NULL DEFAULT '0',
  `criDis` int(11) DEFAULT NULL,
  `majNew` int(11) NOT NULL DEFAULT '0',
  `majFix` int(11) NOT NULL DEFAULT '0',
  `majDis` int(11) DEFAULT NULL,
  `minNew` int(11) NOT NULL DEFAULT '0',
  `minFix` int(11) NOT NULL DEFAULT '0',
  `minDis` int(11) DEFAULT NULL,
  `crcNew` int(11) NOT NULL DEFAULT '0',
  `crcFix` int(11) NOT NULL DEFAULT '0',
  `crcDis` int(11) DEFAULT NULL,
  `etcNew` int(11) NOT NULL DEFAULT '0',
  `etcFix` int(11) NOT NULL DEFAULT '0',
  `etcDis` int(11) DEFAULT NULL,
  `createdDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `userCount` int(11) DEFAULT NULL,
  PRIMARY KEY (`wid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `WeeklyStatusSummary` (
  `year` year(4) DEFAULT NULL,
  `week` tinyint(3) unsigned DEFAULT NULL,
  `day` tinyint(3) unsigned DEFAULT NULL,
  `installationRatio` float DEFAULT NULL,
  `installedDeveloperCount` tinytext,
  `resolvedDefectRatio` float DEFAULT NULL,
  `defectCountTotal` mediumint(8) unsigned DEFAULT NULL,
  `createdDateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

  2.3 Run Dexter-monitor

  • To run Dexter Monitor, you need to run following command in the dexter-monitor folder.
run command
$> node app.js -p=13301
  • -p  = port_number, You can change the Dexter monitor port number. This port is used in the dexter-monitor web page.

3.Verify

Related content