Skip to content
ShaoPin Cheng
  • 首頁
  • 贊助協作
  • 足球賽事表
  • 帳號資訊
    • 登入
    • 註冊
    • 帳號資訊
      • 訂單
      • 數位產品下載
      • 地址
      • 購物車
    • 登出
    • 遺失密碼
  • Blog

Highchart...

  • 2012 年 10 月 19 日2021 年 3 月 17 日
  • by cjt74392

Highcharts for Nagios is  Shao Pin, Cheng為Nagios 開發的開源plugin

What is Highcharts?

Highcharts is a charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application. Highcharts currently supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange and polar chart types.

簡而言之Highchart就是開源的 畫漂亮圖表軟體
為了讓Nagios享有這種傑出的軟體功能,所以我寫了這個插件. (一種創意)
它能動態放大及自動調整圖片Y軸高度,及動態自訂線條顯示.
當一堆線畫在同一張圖時就會明白好用之處.
範例:

Highchart for Nagios – Download

如何 Install :
Ver 1.2
1.您必需先安裝pnp4nagios
2.解壓縮Highcharts4nagios.tar到httpd下您指定的目錄, 如:  /highcharts/
3.修改Nagios (service).cfg服務的設定檔,把action_url或是notes_url加上 /highcharts/highcharts.html?host=$HOSTNAME$&srv=$SERVICEDESC$  (黃字視您安裝的路徑修改)
4.reload nagios讓config生效後就完成了.

ps:Highchart的gray.js themes第一條線的顏色非常醜,您可以修改js/themes/gray.js 內的first colors: #9172EC“,……….  或換成你喜歡的顏色.

進階的參數就請看我前一篇文章
Highcharts for Nagios Timeranges

Highchart...

  • 2012 年 10 月 18 日2021 年 3 月 17 日
  • by cjt74392

Highcharts4 Nagios Update

Ver 1.24 — Update 2013.05.14 
—————————- 
* Interface update

Ver 1.21 — Update 2012.11.01 
—————————- 
*Add custom time range select. 
*Add different domain support. 
*All in one. 

Install Notes

1.You must installed pnp4nagios above 0.6.x, NOT work with 0.4.x 
2.Download highcharts4nagios.rar, unrar to ex:/usr/local/highcharts/ 
3.Modify httpd.conf. 
4.Add Nagios service config with action_url or notes_url to ex: 
notes_url /highcharts/highcharts.html?host=$HOSTNAME$&srv=$SERVICEDESC$ 
4.Restart httpd and nagios.
  (Below this line …. is optional, Not necessary !) 
5.If  highcharts-IP & pnp4nagios-IPchange not in the same server, 
   change  highcharts.html  LocHost=’Your pnp4nagios IP’ values
6.If client in different Domain, you need edit 
   pnp4nagios/share/application/controllers/xport.php 
   add bellow line …
header(“Access-Control-Allow-Origin: *”);  //Allowed *(your IP) Access-Control-Allow-Origin
7.If you are ruining Apache with SSL (https), modify line 150 of highcharts.html from http to https and you can see the graph.


Timeranges

Additionally you can influence the timeranges via the URL. This can be useful to automatically create PDF documents. The ranges can be defined using the options “start” and “end”.
Example:
 highcharts/graph?host=&srv=&start=-1week
The graph will start one week prior to the current date and time. It will end at the current timestamp.
start end view result
all views ending at current timestamp
x all views starting at defined date
x all views ending at defined date
x x one view between the two dates
x one view ending at current timestamp
x x one view starting at defined date
x x one view ending at defined date
Examples of different specifications
format description
2009W04 4. week of 2009
1.5.2009 May, 1st 2009
-1 day one day back
-3 weeks 3 weeks back
-1 year one year back
yesterday yesterday

Customize

Highcharts theme:
1.Highcharts line color:
   Edit js/themes/gray.js or dark-blue.js, dark-green.js, grid.js.
2.Highcharts theme:
   Edit highcharts.html, find gray.js change to {dark-blue.js or dark-green.js or grid.js or skies.js}
3.Theme line color:
   Modify the js/themes/gray.js the first colors: # 9172EC “, ………. or with your favorite color
Calendar theme:
1.Calendar LANG:
   Edit highcharts.html, find en.js change to {cn.js(Tradition Chinese), ca.js, cn.js, cz.js, de.js, en.js, es.js, fr.js, hr.js, it.js, jp.js, nl.js, pl.js, pt.js, ro.js, ru.js, sk.js, sv.js}
2.Calendar theme:
   Edit highcharts.html, find gold.css change to {steel.css, matrix.css, win2k.css, gold.css, steel.css}

Nagios plugin to monitor IBM System i (AS/400)

Nagios pl...

  • 2012 年 9 月 19 日2021 年 3 月 17 日
  • by cjt74392

Nagios plugin to monitor IBM System i (AS/400)

Nagios Exchange – check_as400   This is one of my works.
Check_as400 Version: 1.1.1 : <2013> 
* check number of jobs in JOBQ 

Check_as400 Version: 1.0.1 : 
* check CPU load. 
* check ASP usage. 
* check Pool DB/Non-DB Fault 
* check number of active jobs in system. 
* check to see if job is in the system.
* DB utilization. (Not available after V6R1)
* check DISK Status.
* check if login completes.
* check for any unanswered messages on msg queue.
* check outq files, writer and status.
* check if the subsystem is running.
* check MIMIX Data Group Unprocessed Entry Count. 

Nagios教學教材(設定與實做)

Nagios教學教...

  • 2012 年 6 月 27 日2021 年 3 月 19 日
  • by cjt74392

約兩年前因教育訓練需要寫了一份能在1小時內能教完的簡易的教材,
最近剛好有朋友需要,因此放上來分享.
對於尚不熟悉此軟體建置實做的朋友可以參考此一簡易教學.

點此下載

Nagios Check_as400 PlugIn

Nagios Ch...

  • 2011 年 11 月 18 日
  • by cjt74392

Last edited by Shao-Pin, Cheng Taipei, Taiwan 
———————————————————–

Check_as400 was  created for Nagios to monitor IBM System i.

Easy monitoring of all key indicators.

Nagios Exchange – Check_AS400

The following I have completed the development of options:

      AJ = Number of active jobs in system.
      CJ = Check to see if job is in the system.
      CJS [status ] [noperm]
            = Check to see if job is existing in Subsystem and has this status.
                          Job checking can be controlled by :
                          status       = any other status goes to critical
                          noperm                = don’t go to critical if job is not in the system
                          NOTE: if JobStatus is set, it has highest Priority
      JOBS = Number of jobs in system.
      CJM = Check the temporary storage used of job.
      JOBQ = Number of jobs in JOBQ.
      CPU = CPU load.
      CPUC = CPU load, Consider Current processing capacity. (CPU used * VP nums / cpuBase).
                          NOTE: Specify , EX: You want use 3 CPU only, but VP use more than 3.
      CPUT = Top CPU used job. The total processing unit time used by the job
                          Specify job name, ex: *ALL or QZ* or QZDASOINIT
      US = Percent free storage
      ASP = Check ASP used
      DISK = Check DISK Status.
      DB = DB utilization. (Not available after V6R1)
      DBFault = Pool DB/Non-DB Fault
      LOGIN = Check if login completes.
      MSG = Check for any unanswered messages on msg queue
                          Any unanswered messages causes warning status.
      OUTQ  = Check outq files, writer and status. No writer, or
                          status of ‘HLD’ causes warning status. This default
                          behavior can be modified with the following options:
                             nw   = Don’t go critical when no writer
                             ns    = Don’t warn if status is ‘HLD’
                             nf    = Ignore number of files in queue
                          NOTE: threshold values are used on number of files
      SBS = Check if the subsystem is running.
                          NOTE: specify as library/subsystem
      PRB = Check if the problem was identified.
      ———- VISION MIMIX ———-
      MIMIX = Check MIMIX Data Group Unprocessed Entry Count, Transfer definition, RJ link state.
      ———- Rocket iCluster ———-
      ICNODE = Check for any Inactive or Failed Node status.
      ICGROUP = Check for any Inactive or Indoubt Group status.
      ICSWTCHRDY = Check for multiple conditions for switch readiness.

-SSL
  Use SSL connection.
-d
   Be verbose (debug)
       NOTE: Needs to be one of the first arguments to work
-D
   Be verbose and dump screen outputs (debug)
      NOTES: Needs to be one of the first arguments to work
             When things are not working, use this flag, redirect the output to a file and send it to me!

Notes:
 -CPU, DB and US threshold’s are decimal, JOBS, JOBQ and OUTQ are integers.

======================================================================
Install Note 

======================================================================
* Modify your $NAGIOS_PATH/.as400 with the correct user and password.
* Modify chech_as400 with the correct java path. 
* Set NAGIOS user profile Display sign-on information *NO 
– CHGUSRPRF USRPRF(NAGIOS) DSPSGNINF(*NO) 
Initial program to call  . . . .   *NONE
Initial menu . . . . . . . . . .   MAIN
* Nagios user may need to use IBM default sign-on display file
   Or change nagiso user to other subsystem description to use system default display file
  a.Use the Change Subsystem Description (CHGSBSD) command.
  b.Specify the display file on the SGNDSPF parameter. System default is QSYS/QDSIGNON
  c.ADDWSE SBSD(SBSLIB/SBSD) WRKSTN(QPADEVxx*) AT(*SIGNON)

* Avoid the massive entries log
CHGJOBD JOBD(NAGIOSJOBD) LOG(4 00 *MSG)

* Use SSL connection 
 Must add CE to JAVA, for EX:
keytool -import -trustcacerts -keystore /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre/lib/security/cacerts -storepass changeit -noprompt -alias xxxx_ce -file /xx/xxx/XXXX.cer

* If you upgrade cum-package, then plugin stop working
Releases affected, V6R1M0 and M1, V7.1 and V7.2 (with different ptfs)
Release 610 : MF58587                                           
Release 611 : MF58588                                           
Release 710 : MF58589                                           
Release 720 : MF58590 

There is a PTF to resolve plugin stop working
* RECOMMENDATION: Apply LIC PTF MF59537 for i 6.1              * 

*                 Apply LIC PTF MF59538 for i 6.1.1            * 
*                 Apply LIC PTF MF59539 for i 7.1              * 
*                 Apply LIC PTF MF59540 for i 7.2              *

======================================================================
Help check_as400 – Click Sponsored Ads

======================================================================
This donation will help me provide everyone with greater content

======================================================================
For different language 

======================================================================
(optional 1 – Support EN/FR/DE/IT)

1.If your system is running on another language than english, follow the steps below
# cd /usr/local/nagios/libexec/check_as400/Lang Source
2.Then copy the java class file of your language (EX:substitute french with your language)
# cp check_as400_lang_french.java ../check_as400_lang.java
3.Then compile it
# javac check_as400_lang.java

(optional 2 – Change Nagios user profile to EN)
The NAGIOS user profile has INLPGM parameter set to a CLP (MAINGBCL)
This is the MAINGBCL:
/*********************************************************************/
/* SERVER PROFILE FOR NAGIOS !!!!!!!!!                                                               */
/*********************************************************************/
PGM                                                                                                                                  
              CHGSYSLIBL LIB(QSYS2924)                                                                        
              RCLRSC                                                                                                              
ENDPGM 
                                                                                                                          

This CLP change the language in English.

======================================================================
Troubleshooting

======================================================================

Use -D (debug) option,
.For example
check_as400  -D  -H x.x.x.x -v DISK > debug.log

======================================================================
Change log
======================================================================

Check_as400 Version: 1.5.1 <2019> 
* Fixed WRKSYSSTS check problem on V7R3 


Check_as400 Version: 1.4.4 <2017> 
* Fixed CPUT problem on OS V7R2. 
* Added check job temporary storage used. (Thanks, BIANCHI Xavier) 


Check_as400 Version: 1.4.2_1 (2016/04/29)
* Added ITALIAN language. (Thanks to Riccardo Morandotti)

Check_as400 Version: 1.4.2 <2015 style="font-family: verdana, tahoma, sans-serif; font-size: 12px; line-height: 20.4px;"> (2015/06/29)
* Added SSL connection option. 
* Fixed username display in Login ERROR message. 
* Fixed Log in failure on 10 character username. 

Check_as400 Version: 1.3.0 : (2015/03/10)
* Modified check CJ for duplicate jobs, can specify job number for CRITICAL and WARNING value.


Check_as400 Version: 1.2.9 :  

* Fixed check MSG for LANG FR/GE string index out of range error. 
(Thanks to Frederic MOURAGUES) 

Check_as400 Version: 1.2.8 :
* Added check for Number of file members. 
(Thanks to Tim Vandegrift) 

Check_as400 Version: 1.2.7 : ( 2013.08.29 ) 
* Added check for work with problems. 
* Added check for top CPU used job. 
The total processing unit time used by the job. 

Check_as400 Version: 1.2.5 :
* Added check for Rocket iCluster. Node Status, Group Status, Switch Readines. 

Check_as400 Version: 1.2.4 : 
* Added French language definitions 
* Fixed check CJ command && parse error. 
* Fixed check OUTQ error with V6R1/V7R1. And can specify the library now. 

談Nagios 開放原始碼監控系統

談Nagios 開...

  • 2011 年 8 月 31 日2021 年 3 月 19 日
  • by cjt74392

前一陣子忙於工作與考試,有件事一直未放上網誌,以免又忘了….

今年五月的某一天,很高興和PowerOp聊聊我非常愛用的開源軟體 Nagios,
說明開源軟體在實務上做了那些應用,
PowerOp podcast

開源的精神就是靠群體互助,讓軟體越做越好.
非常高興又完成一件 分享 的樂事 !

————————————————————————–
近來對Nagios又有新的想法與作為,
我發現可以拿來做資訊安全控管監控軟體,
1.寫程式監控規則型的入侵檢測. IDS by rule
如: IF a root user creates File1 and File2
2.寫Hook放在online交易中檢核帳務.
3.再透過Nagvis整合監控畫面.

嗯….這些我都做的到,完成後想必很牛B.

AIX上使用Nagios監控軟體接收SNMP的訊息,以IBM TS3100為例

AIX上使用Nag...

  • 2011 年 4 月 15 日2021 年 3 月 19 日
  • by cjt74392

1.在AIX編譯 SNMP 5.5 或是去找rpm安裝
./configure –disable-embedded-perl –without-kmem-usage

2.安裝SNMP (snmpd snmptrapd)
(1).安裝後設定設定檔 ./snmpconf -i
(2).IBM TS3100磁帶館預設snmp community是 public (initial),

3.安裝snmptt 以處理Trap後的Log
(1).snmptrapd.conf要加權限,並讓snmptt的Stand along和Daemon mod都能處理snmptrap的訊息
authCommunity log,execute,net public
traphandle default /usr/sbin/snmptthandler
traphandle default /usr/sbin/snmptt
重啟snmpd及snmptrapd
(2).snmptt 導入要監控的mib檔
./snmpttconvertmib –in=/usr/share/snmp/mibs/powernet361.mib –out=/etc/snmp/snmptt.ibm.conf
(3).vi snmptt.ini 將 snmptt.ibm.conf 加入
(4).要送訊息的部份加入submit_check_result HOSTNAME SERVICENAME CODE MESSAGE,範例如下
EVENT eventDoorOpen .1.3.6.1.4.1.2.6.210.4.2 “Status Events” INFORMATIONAL
FORMAT Library Door Opened: The library $1 (Serial Number $2) door has been opened.
EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result AS400-B0000 TS3100 1 “The library $1 (Serial Number $2) door has been opened”
SDESC
The library door has been opened.
Variables:
EDESC
(5).重啟snmptt服務,查log是否正確
(6).開TS 3100的Door或是Login/Logout Web帳號做測試.

Debug
1.有問的的話改snmpd.conf snmptrapd.conf snmptt.ini(debug=2),輸出log
2.AIX 開IIP trace,看該設備有沒有訊息到AIX
/usr/bin/startsrc -s iptrace -a “-a -b -d x.x.x.x -i en0 /var/log/snmptt/iptrace.cap” >/dev/null 2>&1
/usr/bin/stopsrc -s iptrace >/dev/null 2>&1
看trace log
ipreport -srn /var/log/snmptt/iptrace.cap

Nagvis的應用範例

Nagvis的應用...

  • 2010 年 10 月 25 日2021 年 3 月 19 日
  • by cjt74392

如果你喜歡Nagios圖型化的監控,
那麼你一定會喜歡用Nagvis這個套件去滿足你老闆的視覺.
以下是我的圖型範例(我的美工不好,多多關照)

Nagios Plug In (Dash 及 AS/400)

Nagios Pl...

  • 2010 年 10 月 25 日
  • by cjt74392

日前寫了兩個Nagios的插件,在浩瀚的自由軟體世界 再次 貢獻我的心力.

很榮幸獲得很多人的肯定.並給了我4~5顆星的評等.請享用.
歡迎先進同輩指教.當然也樂於問題詢問.

Nagios Dash from NDOUtils

Nagios Dash from NDOUtils Forked Nagios Dashboard – PHP and select data from NDOUTILS DB. Easy to monitor Unhandled error only.

/Category:Web Interfaces
LicenseGPL

check_as400

check_as400 Nagios plugin to monitor IBM AS400.

/Category:IBM
LicenseGPL

近期文章

  • XRDP 中文支援相關設定
  • 如何陪伴小一新鮮人,快樂學習健康成長
  • (三國)我今天的手稿創作 Paper painting.
  • AIX 7.1 + Apache 2.4 + PHP libphp5.so with PDO
  • Highcharts for Nagios

近期留言

  • 「Unknown」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「David Yu」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「紹斌」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「Henrik」於〈Nagios Check_as400 PlugIn〉發佈留言
  • 「Unknown」於〈考取CISA的經驗〉發佈留言

彙整

  • 2025 年 6 月
  • 2016 年 9 月
  • 2014 年 11 月
  • 2013 年 2 月
  • 2012 年 10 月
  • 2012 年 9 月
  • 2012 年 8 月
  • 2012 年 6 月
  • 2012 年 5 月
  • 2011 年 11 月
  • 2011 年 10 月
  • 2011 年 8 月
  • 2011 年 4 月
  • 2011 年 3 月
  • 2011 年 2 月
  • 2011 年 1 月
  • 2010 年 10 月

分類

  • AIX
  • AS400
  • CISA
  • GLPI
  • Nagios
  • RHCE
  • Win 7
  • 個人未分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
Theme by Colorlib Powered by WordPress