One of the most fun features of dim_STAT is ability to add your OWN statistic(s) to the package. Once added, they will make part of standard set of STAT(s) and give you the same kind of service: OnLine Monitoring, UpLoading, Analyzing, etc. So, there are two kind of collectors supported by dim_STAT:- SINGLE-Line: collectors with one output line per measurement (like vmstat, etc.)
- MULTI-Line: collectors with several output lines per measurement (like iostat, vxstat, etc.)
To be correctly interpreted, your collector has to produce stable output (same format for data lines, same number of lines in MILTI case, keep time-out interval correctly, etc.). Lines different of data have to be declared as ignored by dim_STAT.For example, you have two collectors: app_time and app_user
# app_time 10 ReadMsg ControlMsg GetService DbQuery Commit SendMsg 0.01 0.2 0.5 0.9 1.1 0.03 0.02 0.3 0.7 0.85 1.4 0.02 0.01 0.2 0.5 0.9 1.1 0.03 0.02 0.3 0.7 0.85 1.4 0.02 ^C # # app_user 10 User NbServices NbQueries admin 10 44 dim 23 67 larry 34 43
User NbServices NbQueries admin 1 2 dim 0 0 larry 12 56 guest 3 23User NbServices NbQueries admin 0 0 dim 1 3 guest 121 306 ^C
So, app_time is SINGLE-Line and apps_user is MULTI-Line. To add this collectors to dim_STAT you have to use New STAT page. Firstly, you will give the name for your STAT (APP_time and APP_user for ex.), number of data columns in output (6 and 3), STAT type (SINGLE-Line and MULTI-Line). According your STAT type you will be invited to fill another form with data descriptions:app_time
=======
STAT Name: APP_time
Shell-Command: app_time %i
Ignore Lines: *Msg*
Also you give column names for database, data types, full names of columns for reporting, data positioning (word # in collector output), using or using column in Multi-Host Analyze:app_userAttention: for MULTI-Line collectors you have to specify the STAT Attribute (column which contains "label" information in collections, like diskname in iostat). So, for app_user it will be "user" column...
========
STAT Name: APP_user
Shell-Command: app_user %i
Line separator(s):
Ignore Line(s): *NbServices*
Note: | you may leave database column names by default in case you are sure you'll never access database directly (so you don't need specific naming). |
---|---|
IMPORTANT! | Don't forget to copy your new stat program to the machine under monitoring and enable this program for machine's STAT-service! |