Files
2026-08-07 17:38:18 +09:00
..
2026-08-07 17:38:18 +09:00
2026-08-07 17:38:18 +09:00
2026-08-07 17:38:18 +09:00
2026-08-07 17:38:18 +09:00
2026-08-07 17:38:18 +09:00
2026-08-07 17:38:18 +09:00

[기능 설명]

본 PHP 모듈은 PostgreSQL CCDB 상에서 서비스 정보와 각 서비스별 Storage 사용량

정보를 확인한 후 

Storage 사용량이 설정된 관제 임계치를 초과할 경우....

check_storage.conf 상에 지정된 담당자에게 SMS, Mail 을 전송을 수행한다.





[설치 경로]

binary  : /user/service/bin/check_storage.php 

include : /user/service/bin/inc/sendmail.inc, mysql.inc, oci8inc.php

conf    : /user/service/etc/check_storage.conf





[output file]

check_storage_report.html

  - GMS Web 상에서 접근 가능한 경로에 저장되도록 처리.

  - GMS Web 상이 Storage 사용량 버튼과 연동되도록 처리 필요.





[기동 방식]

crontab 상에 다음과 같이 등록하여 30분마다 동작하도록 처리.( -q 옵션 미사용시 불필요 Header 발생 가능)



*/30 * * * * root /usr/local/bin/php -q /user/service/bin/check_storage.php > /user/service/wwwroot/sh_monitor/status/check_storage_report.html





[설치 관련 사전 조건]

1. 해당 장비에서 PostgreSQL CCDB 와 접속 가능해야 함.

2. 해당 장비에서 sendmail 프로세스가 정상 동작.

3. SMS 전송을 위한 각 IDC 별 설정이 필요함.





[PHP 설치 방법]

1. 해당 GMS 에 PHP 가 설치되지 않은 경우.. 

2. 다음과 같이 소스 설치 처리한다.



  # php-5.5.10 소스 설치 후.

  # ./configure --with-pgsql=/user/db/pgsql --with-mysql=/user/db/mysql(SMS 전송관련 각 IDC 별 옵션)

  # make

  # make test

  # make install

  # /usr/local/bin/php -v





[IDC 별 수정항목]

IDC 별 CCDB 및 SMS 전송 등의 방법이 다르므로.... 

check_storage.php 에서 TODO 로 표시된 항목을 검색하여 

각 IDC 에 맞도록 수정 처리 또는 기능 추가한다.





[GMS Web 수정]

/user/service/wwwroot/sh_monitor/inc/contact.html 소스 상의 function disk_check() 함수에 다음과 같이 수정 처리



	window.open("../status/check_storage_report.html","_box", 'height=' + screen.height + ',width=' + screen.width + 'fullscreen=yes, scrollbars=yes');