<< | [up] | >> |
dim_STAT User's Guide. by Dimitri |
Administration |
Several administration points were already covered in previous sections. Let's speak about some other, more oriented on day to day management...
Active/Stopped Collect |
Each STAT-collect may be only in 2 states: Active or Stopped. The state a collector is in is stored in the database. When the state of the collect is changed from the Web interface, the only action is an update of the corresponding database record, that's all. From time to time each collector checks its own record for changes, and if so, it takes corresponding action. Since v.7.0 at any time any stopped collect may be restarted again. Active : a collector gets data from the server via the STAT-service, and while the service is up, it continues to insert data into your database. If the STAT-service is down, it will trying to reconnect every 20 secs. Stopped : the collect is stopped as well all the corresponding stat commands on the monitored server. No more data is inserted into the database.
Delete/Recycle Collects |
Finished collects can be completely removed from the database, or recycled. You may remove, for example, all data previously collected during the last N days. Actually, only manual recycling is possible. Note: a delete operation frees space in the database index/data files, but it doesn't reduce the actual file size! Freed-up space will simply be reused for next collects. Deleting a database was covered previously in "MySQL Admin Tips"...
Auto-Recycle |
Since v.8.1 an Auto-Recycle module is integrated into dim_STAT. Well, it still needs to be run from a cron job or another execution planner, but at least, once it's configured, it gives you a simple way to recycle your collected data automatically. In your '/apps/ADMIN' directory you find the 'dim_STAT-Recycle' command:# /apps/ADMIN/dim_STAT-Recycle
Usage: dim_STAT-Recycle -Days N [-Base DBname] [-ID CollectID] -Days N -- keep data collected during last N days -Base DBname -- database name(s) (def: Default) -ID CollectID -- collect ids (ex: id1,id2,id3 or "ALL" for any ID) (def: All active collects only)So, to recycle every 24 hours and to maintain in your database 'Prod' only data collected during the last 3 weeks, all you need to do is to add the following to the crontab on your dim_STAT server:
NOTE :0 0 * * * /apps/ADMIN/dim_STAT-Recycle -Days 21 -Base Prod
- Days delay is purely by calendar! Recycle will delete all your data from the last collected day to N calendar days back, independent of possible inactivity holes in the collected data
- if no ID is given, only currently active collects will be recycled
- if a list of ID is given, all these collects will be recycled independently if they are active or not
- if ID is equal to ALL - all collects will be recycled independently if they are active or not
Export/Import collects |
Collect Export and Import is an easy way to save/copy/restore small amounts of data in a compressed form. In case you need to copy a large amount of data, it is much faster to copy the whole database! (This was extensively covered in "MySQL Admin Tips".)
Modify Collect parameters |
You should be VERY CAREFUL with these actions!
Changing the Title and Hostname are just for decoration. :)) Changing Collect-ID, which is a global operation, will lock all corresponding tables, while making modifications. Changing Time Interval makes only sense with wrongly loaded data from output files. Be aware that you're changing your time scale and will loose synchronization with real world events. Changing Start Time can be used when you want to compare similar workloads, that were collected on different periods. You can bring them onto the same time scale and then analyze via Multi-Host mode. However, if you have any LOG messages corresponding to the same collect, then don't forget to move them also in time to keep timestamp synchronization.
LOG Messages operations |
This can be used in case there are too many messages, or that you want to share them with other collects, or when you want to move them slightly in time, etc. You can do all of that and much more via "LOG Messages Admin".
<< | [up] | >> |