List of Contents
Machbase Web Analytics (MWA)는 Python 2.7과 Flask기반의 Werkzeug, Jinja2로 개발된 Web application이다.
...
추가로, $MACHBASE_HOME/lib 폴더를 $LD_LIBRARY_PATH에 추가하고 libmachclilibmachbasecli_dll.so 파일이 그 폴더내에 있는지 확인해야 한다.
...
MWA 서버는 $MACHBASE_HOME/bin/MWAserver 스크립트 파일을 실행하여 수행한다이용해 실행한다. 이 스크립트는 $MACHBASE_HOME 환경변수를 이용하여 수행되므로 이용하므로 해당 환경 변수를 반드시 설정해야 한다. 이 스크립트는 START, STOP, RESTART, RESET, PORT 명령 옵션을 지원한다. 'MWAserver start' 명령으로 서버를 수행할 실행할 수 있다. port 명령 옵션을 이용하면 MWAserver가 이용하는 기본 포트 번호인 5001이 아닌 다른 포트를 이용하여 MWA가 동작하도록 설정할 수 있다.
...
Connect to MWA with Web Browser
웹 브라우저를 통해서 MWA 서버 IP와 포트번호포트 번호(예 http:127.0.0.1:5001)를 입력하여 MWA에 접속할 수 있다. 웹 브라우저로는 최신 크롬 브라우저를 추천한다. 접속에 성공하였다면, 로그인 화면이 표시될 것이다. 기본 로그인 계정과 패스워드는 "admin"/"machbase"이다.
...
사용자 권한부여 및 설정을 쉽게 하기 위해서 여러 사용자들을 그룹을 설정할 수 있다. 화면의 좌측 위에서 원하는 그룹 카테고리를 선택할 수 있다. 그룹 카테고리는 "Users"메뉴의 "Available Groups" 매뉴에서 메뉴에서 설정할 수 있다. ADMIN 계정 사용자는 모든 권한을 갖는다. ADMIN 계정 사용자만 그룹을 등록할 수 있다.
Permission
저장된 Bookmark 질의, 그리드, 대쉬보드등의 대시보드등의 리소스에 대한 권한을 설정한다. 권한은 ALL, USER, OWNER 세 가지이다.
...
MWA는 질의 결과를 Grid, 차트로 나타내고 이 결과를 대쉬보드 대시보드 형태로 표시하는 기능이 있다. 대쉬보드를 대시보드를 생성하려면 먼저 그리드, 차트를 생성하여 등록하고, 대쉬보드를 대시보드를 생성하여 등록된 차트, 그리드등을 원하는 형태로 배치하고, 대쉬보드를 대시보드를 등록하는 것이다. 대쉬보드를 대시보드를 한번 등록하면 원본 그리드, 차트를 변경하더라도 그 대쉬보드에 대시보드에 등록된 차트, 그리드는 변경되지 않는다.
사용자는 오른쪽의 대쉬보드와 대시보드와 관련된 정보를 생성하고, 변경하고, 삭제하거나 선택할 수 있다. 그리고 대쉬보드에 대시보드에 외부 url을 우하단의 "Link URL"항목에 입력하여 대쉬보드에 대시보드에 외부 페이지를 입력할 수 있다. 사용자마다 권한여부에 따라 표시될 수 있는 대쉬보드 대시보드 항목이 다르게 돌 수 있으므로, 로그인하지 않아도 데이터를 표출하려면 권한을 ALL로 설정해야 한다.
Dashboard 생성 및 편집
대쉬보드를 대시보드를 생성하고 차트나 그리드등을 추가하기 위해서 대쉬보드 대시보드 편집화면에서 "Row+"버튼을 이용하여 row를 생성하고, "Row-"버튼을 이용하여 아래쪽부터 row를 삭제할 수 있다. Row에 판넬을 패널을 생성했다면 그 판넬을 패널을 삭제한 이후에 삭제할 수 있다. Chart+, Grid+, HTML+, URL+ 버튼을 이용하여 row에 판넬을 패널을 추가할 수 있다. 판넬의 패널의 내용으로 저장해 둔 차트나 그리드를 선택할 수 있다. 단, 사용자로부터 입력을 받는 입력 매개변수를 갖는 차트와 그리드는 판넬에 패널에 등록할 수 없다.
HTML+ 버튼을 이용하여 HTML 또는 자바스크립트, chart.js를 이용하는 jquery 데이터를 표시할 수 있다. ID 애트리뷰트를 설정했다면, 다른 대쉬보드 대시보드 구성요소와 동일한 값이 설정될 수 있으므로, ID를 "_ID"로 지정하여 사용하면 된다.
...
SQL질의를 그래프로 표시할 수 있다. Chart의 Result탭에서 질의결과를 확인할 수 있고 Setting tab에서 차트 표시에 관련한 파라메터를 설정할 수 있으며, 결과로 표시되는 차트는 Char Chart 탭에서 확인할 수 있다.
MWA는 시계열 차트를 쉽게 생성할 수 있는 "Builder"를 제공한다. 사용자는 집계할 시간 간격을 설정할 수 있고, X축과 Y축에 해당되는 데이터를 설정할 수 있다. Y축 값이 숫자인 경우, SUM 또는 AVERAGE와 같은 함수를 사용할 수 있다. 숫자가 아닌 경우, 레코드 카운트를 이용하여 표시할 수 있다. 시계열 그래프를 생성하면 기본으로 라인 차트를 생성한다. 기본 설정은 Setting 탭에서 변경할 수 있다. 차트 화면의 아래쪽에 그리드를 표시하려면 Config 버튼을 클릭하고 원하는 칼럼을 컬럼을 Columns탭에서 선택한다. 칼럼 컬럼 데이터를 그리드에 표시할 때 좌우 폭은 비율에 따라 설정된다. 예를 들어 Width에 1, 2, 1의 값을 주면 화면 표시 비율은 25%, 50%, 25%의 순으로 설정된다.
...
Grid
질의 결과를 테이블 형태로 표시하기 위해서 Grid를 사용한다. 질의 결과에서 필요하지 않은 칼럼을 컬럼을 제외하고 표시할 수도 있다. Builder버튼을 Builder 버튼을 이용하여 WHERE절을 작성하는데 도움을 받을 수 있다. 단, 이 기능은 단순 조건절만을 지원한다. 결과데이터에서 결과 데이터에서 특정 칼럼만을 컬럼만을 선택하려면 Config버튼을 Config 버튼을 클릭하여 Columns 탭에서 "+"버튼을 클릭한 후, 타이틀과 출력 너버 너비 설정을 하고 사용할 수 있다.
Column width는 chart의 grid설정에서 grid 설정에서 설명한 것 처럼 것처럼 백분율 비율로 처리된다. 질의 매개변수 설정 또한 Chart와 같은 기능을 수행한다. Output에서 질의 결과를 다양한 파일로 저장할 수 있는 점도 차트와 동일한 기능이다.
...
"Tables"탭에서 생성한 테이블 리스트와 각 테이블 스키마를 확인할 수 있다. 테이블 명을 클릭하면 그 테이블의 일부 데이터가 표시된다. 질의를 매 5초마다 재실행하여 결과를 리프레쉬한다. "Results"탭에서 질의 결과를 확인할 수 있다. "Input selected text at cursor position" 체크박스를 선택한 경우, 클릭한 위치의 문자열이 질의 입력창에 자동으로 입력된다. Grid 또는 Chart와 같은 방법으로 질의 결과를 다양한 포멧의 포맷의 파일에 저장할 수 있다.
Table Explorer
...
Collection
Data Collection The registered collector managers and lists of collectors will be aggregated in a tree format based on a table unit from the database. Template file
마크베이스 서버에 등록된 collector manager와 collecotor 리스트가 트리 형태로 표시된다.
템플릿 파일(.tpl), regex file 정규 표현식 파일(.rgx) and preprocess file 과 전처리 스크립트 파일(.py) must be located in the specified path of 은 MACHBASE_HOME 경로를 기준으로 다음의 경로에 위치해야 한다.Template file
- 템플릿 파일(.tpl) : $MACHBASE_HOME/collector
...
- 정규 표현식 파일(.
...
- tpl) : $MACHBASE_HOME/collector/regex
...
- 전처리 스크립트 파일(.py) : $MACHBASE_HOME/collector/preprocess
In a table, the number of records will be displayed on the right next to the icon of an eye. When you hover your mouse over the eye icon화면에 표시된 테이블의 우측에 눈(eye)모양의 아이콘 오른쪽에 레코드의 수가 표시된다. 눈 모양의 아이콘 위로 마우스 커서를 옮기면, "View Table" window will be appeared. If you click the icon, it will take you to 윈도우가 표시된다. 눈 모양의 아이콘을 클릭하면, "Table Explorer" to check the contents. And below tables show execution states whether the collector or collector manager is running, and collection speed. On the right side of each collector, you can find three little icons representing START, STOP and DROP commands.
Click "add Manager" button to execute the collector manager in a separate popup window. In this window, you can register a collector manager with "Create Manager" button, and can find the three icons on the right side representing RENAME, DROP and LIST features. LIST will display all the collectors that are registered to the collector manager.
You can create a collector with "add Collector" button. Select the collector manager first and insert a collector name. The collector name must be unique in the collector manager.
To click "Template" button, a window will be appeared. You can manage templates in this window and click "New" button to create a new template. at the end of each template, there is an icon to edit the existing template. With this feature, you can create a new template by changing the name of the existing template and save. Caution must be exercised to check whether DB_ADDR and DB_PORT are correct before saving them. If hovering your mouse over a box where you type in or select items, you can find the information form tooltip description..
Preprocess
It manages script files of preprocess that are used in the template file. If you select a collector manager from the upper right corner of the screen, it fetches the list of preprocess script files. To click "Reload" button under of the collector manager, it fetches the list of script files again.
To click a preprocess script file, you can select and modify the contents, and even initialize the script contents by clicking "New" button. Aslo the contents of the script file will be displayed on the left side. To click "Save" button, it can save inserted contents. In this case, if a new file name is inserted, a new script file will be created.
Regular Expression
It manages regular expression files that are used in template files. When you select a collector manager on the upper right corner of the screen, it fetches the list of regular expression files. To click "Reload" button under the collector manager, it fetches the list of regular expression files again.
When you click a regular expression file from the list on the right side, you can select and modify the contents, and even initialize the contents of regular expressions and create a new regular expression by clicking "New" button.
Insert regular expressions on the top. See below for detailed instructions.
Regex(REGEX): regular expression to analyze data.
Start(START_REGEX): a regular expression to represent a starting point of data. It is included for REGEX analysis.
End(END_REGEX) : a regular expression to represent a ending point of data. It is excluded for REGEX analysis.
- If END_REGEX is not inserted, a collector will not be operated.
On the bottom of the screen, a table of column list will be displayed. In the table, it lists the results of regular expressions that will be stored in tables. Regex No is the result number representing execution results of machregex and the rest of them are a column name, type, and size of a table. These items can be added, modified and deleted.
Click Test tab to conduct sample test. Insert sample data and click "Test" button on the right side of the tab, "Test Regex" window will be displayed so that users can check the execution results of machregex. If the test results are succeeded, select columns from Columns tab to use. The message will be displayed on the window telling you whether the test was succeeded. If so, fill out related information for column name, type and size. When you click "Apply" button, it will organize the column list again. And the existing column list will be disappeared.
DB Admin
Tables
It manages tables and table spaces. It checks schema and indexes of tables.
Running Queries
It selects the currently operating queries. If the currently operating queries are not required, it can make it stop.
System Monitoring
This is a dashboard to monitor system information of Machbase Web analytics Server. If there is item or information that cannot be obtained from the server, it will be left in a blank.
If you wan to monitor other server, MWA must be operating in that server and you can access it if you have "Web URL" that was used when register the server.
Preferences
Servers
Register a server. Users with ADMIN authentication can access it.
Server name | It will be used for IP and port. |
---|---|
Host and Port | It is IP and port to access Machbase DB. If the sever is the same as Machbase Web Analytics, 127.0.0.1 or localhost can be used. |
Web URL | Users can access the server with this URL from their machines. |
UserID and Password | User ID and password to access Machbase database. |
At least one server must be maintained, and for Machbase DB, it is able to execute commands to control the server with "Command" button. When MWA is currently operating, for another Machbase DB, all features can be used except commands that are controlled by "Command" button. If another Machbase database is installed in other server and MWA is operating, that Machbase database can be controlled by "Command" button.
How to change your private IP to public IP
Please change your private IP to public IP in the following way.
1) Go to MWA> Preferences> Servers.
2) Action - Edit server: change server settings.
3) Host: Enter the IP to be changed.
4) Click the "OK" button.
Groups
It manages available groups. Users with ADMIN authentication can access. Groups registered here can be used for categorizing Chart, Grid, Dashboard, and Bookmark Query.
Users
It manages users. Users here mean that users who use Machbase Web Analytics not Machbase database users.
It can set starting screen of users. Starting screen can choose from System Dashboard, SQL and Dashboard. If Dashboard is selected, it can select one of available dashboard should be selected as starting screen.
ADMIN users can register available servers and groups for each user화면으로 전환되어 테이블 내용을 확인 할 수 있다. 테이블 하단에는 컬렉터와 컬렉터 관리자의 실행 상태와, 데이터 수집 속도를 볼 수 있다. 각 컬렉터 이름의 오른쪽에 컬렉터에 실행, 중지, 삭제 명령을 실행하는 아이콘이 있다.
"add Manager" 버튼을 누르면 별도의 윈도우에 컬렉터 관리자를 실행하는 윈도우가 열린다. 이 윈도우에서 "Create Manager" 버튼으로 신규 컬렉터 관리자를 등록할 수 있고, 오른쪽에 RENAME, DROP, LIST 기능을 실행할 수 있는 버튼이 있다. LIST 버튼은 그 컬렉터 관리자가 관리하고 있는 컬렉터의 목록을 표시한다.
특정 컬렉터 관리자가 관리하는 컬렉터를 "add Manager" 버튼을 이용하여 생성할 수 있다. 컬렉터 관리자를 선택한 다음, 생성할 컬렉터의 이름을 입력한다. 컬렉터의 이름은 컬렉터 관리자에 대해서 유일한 값이어야 한다.
"Template" 버튼을 클릭하면 새로운 윈도우가 표시된다. "New" 버튼을 이용하여 새로운 템플릿 파일을 생성할 수 있다. 각 템플릿 파일 명의 오른쪽에 템플릿 파일을 수정하기 위한 버튼이 있다. 이 기능을 이용하여 기존에 만들어진 템플릿 파일을 이용하여 새로운 템플릿 파일을 생성할 수 있다. 템플릿 파일을 생성, 변경하고 저장하기 전에 DB_ADDR 및 DB_PORT필드가 적절한 값인지 확인해야 한다. 화면에 표시된 각 구성요소에 마우스 커서를 가져가면, 구성요소에 대한 설명이 표시된다.
Preprocess
이 기능은 전처리 스크립트 파일을 관리하기 위해 사용된다. 컬렉터 관리자를 화면의 우측 구석에서 선택하면, 전처리 스크립트 파일의 목록을 표시한다. "Reload" 버튼을 누르면 파일 목록을 다시 읽어서 표시한다.
스크립트 파일명을 클릭하여 파일을 편집할 수 있고, "New" 버튼을 이용하여 새로운 스크립트 파일을 생성할 수 있다. "Save" 버튼을 이용하여 변경하거나 생성한 파일을 기록할 수 있다.
Regular Expression
템플릿 파일에서 사용되는 정규 표현식 파일을 관리하는 기능이다. 우측에서 컬렉터 관리자를 선택하면, 정규 표현식 파일의 목록을 표시한다. "Reload" 버튼을 이용하여 목록을 다시 읽어 올 수 있다.
정규 표현식 파일 목록에서 파일을 클릭하면 파일 내용이 표시되고 그 파일을 변경할 수 있다. "New" 버튼을 이용하여 신규 정규표현식 파일을 생성할 수 있다.
정규 표현식 파일은 다음의 구성 요소를 포함해야 한다.
- REGEX : 데이터를 분석하기 위한 정규 표현식이다.
- START_REGEX : 분석 대상 데이터의 시작 지점을 지정하는 정규 표현식이다. 이 데이터는 REGEX 분석데이터에 포함된다.
- END_REGEX : 분석 데이터의 끝을 나타내는 정규 표현식이다. 이 이후 값은 분석에 포함되지 않는다. 이 값이 지정되지 않으면 컬렉터는 동작하지 않는다.
아래쪽 화면에 분석 데이터가 입력될테이블의 컬럼 목록이 표시된다. Regex No는 machregex의 결과로 생성되는 일련번호이며 그 이후에 컬럼 이름, 타입, 사이즈가 표시된다. Test 탭을 눌러서 샘플 테스트를 실행해 볼 수 있다. 테스트 결과 성공했다면 Columns 탭에서 원하는 컬럼을 선택한다. 테스트를 실행하면 창에 테스트 실행이 성공했는지를 표시한다. 성공 이후에, 원하는 컬럼 이름, 타입, 사이즈를 설정하고 "Apply" 버튼을 누르면 컬럼 리스트를 다시 표시하게 된다.
DB Admin
Tables
테이블과 테이블 스페이스를 관리하는 화면이다. 테이블 스키마와 테이블 인덱스를 확인할 수 있다.
Running Queries
현재 실행중인 질의문들을 표시한다. 실행중인 질의를 중단시킬 수 있다.
System Monitoring
MWA서버가 실행되고 있는 시스템에 관련한 정보를 표시한다. 정보를 얻을 수 없는 경우에는 공백으로 표시된다. MWA를 현재 실행하는 장비가 아닌 장비를 모니터링 하기 위해서는 원하는 장비에 MWA를 실행하고 그 장비의 "Web URL"을 등록해야 한다.
Preferences
Servers
마크베이스 서버를 등록하기 위한 메뉴이다. MWA 사용자 중 ADMIN 권한을 갖는 사용자만 접속할 수 있다.
서버 이름 | 서버의 이름 |
---|---|
Host and Port | Machbase DB 서버의 IP 주소와 포트 번호를 설정한다. MWA 서버와 같은 장비에서 마크베이스 DB를 실행중인 경우, 127.0.0.1 또는 localhost를 사용할 수 있다. |
Web URL | 이 URL을 이용하여 접속할 수 있다. |
UserID and Password | Machbase DB 서버의 사용자명과 암호 |
최소 하나의 서버는 등록해야 한다. MWA 서버가 실행중인 장비에 Machbase DB를 실행중인 경우 "Command" 버튼을 이용하여 서버 시작과 종료, DB 생성 등의 명령을 수행할 수 있다. 다른 장비에 실행중인 Machbase DB 서버에 대해선 "Command" 버튼으로 실행하는 명령을 제외한 기능들을 이용할 수 있다. 현재 실행중인 MWA 서버가 아닌 다른 장비에도 MWA 서버가 DB 서버와 같이 실행중이면 "Command" 버튼의 명령들을 실행할 수 있다.
Groups
MWA사용자 그룹을 관리한다. ADMIN 권한을 갖는 MWA 사용자만 접근할 수 있다. Chart, Grid, Dashboard, Bookmark query를 그룹마다 등록하여 관리할 수 있다.
Users
사용자 계정을 관리한다. 이 사용자 계정은 Machbase DB사용자가 아니라 MWA 사용자를 의미한다. 대시보드의 경우, 이전에 생성한 대시보드를 선택하는 화면이 표시된다.
ADMIN 사용자는 각 사용자와 서버를 등록하고 관리할 수 있다.
Available Groups: set ADMIN/USER to Authority.
Available Servers : set default server.
Users with USER authentication can only modify their information such as passwordUSER 권한의 사용자는 PASSWORD만 갱신이 가능하다.