-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Install from GitHub, create datastore file and put an HTML template into the web folder:
git clone https://github.com/dotgit/monitask.gitAn experimental config script is provided under
monitask/configure.sh, which will try it's best in pre-configure your installation and running the following instructions automatically. You will still have to add the crontab job and configure web access on your server.
monitask/configure.shIf it fails, you can review the process manually starting at this point:
sudo mkdir /var/lib/monitask
sudo mkdir /var/www/monitask
sudo monitask/run-monitask.php --datastore
sudo sh -c 'monitask/run-monitask.php --template > /var/www/monitask/index.html'Monitask is written in PHP and may be run on any *NIX - like OS. The code below is provided for Linux.
If you do not have PHP with json and mbstring extensions installed, run the following code:
sudo apt install php-cli php-json php-mbstringIf PHP is already installed, check for the json and mbstring modules:
php -mIf the modules do not appear as installed extensions, install them:
sudo apt install php-json php-mbstringTo install Monitask you need to select a program folder, a datafile location and a folder for exporting metrics.
We'll create program folder in our home directory by cloning the monitask repository from GitHub:
git clone https://github.com/dotgit/monitask.gitThis command creates monitask directory, where the program and default config files are stored. When Monitask is called without specifying the location of its config file, it starts with the ini/monitask-linux.ini file inside the program folder.
Monitask has a flexible plugin-based architecture. Default datastore is of type CSV and stores data in a single .csv file. Check the ini/monitask-linux.ini file section [datastore] and filename directive to find out the location of datastore file. See Config files for detailed discussion about config files parsing rules.
Default datastore file location is /var/lib/monitask/monitask.csv.
sudo mkdir /var/lib/monitaskTo create the file run the following command:
sudo monitask/run-monitask.php --datastoreThis command creates a new datastore file (or exits with an error if the file already exists).
Check the [export] section of config file and export_dir directive. It contains the folder where the exported JSON files will be generated when Monitask is invoked with --export argument.
Default export folder is /home/www/monitask. You may change the directive to point to existing folder or create a new export folder:
sudo mkdir /var/www/monitaskIf creating a new folder, be sure to modify your web server configuration accordingly.
The template HTML file will contain the list and placeholders for all graphs. This file will be served from your web folder. To generate it, run the following command:
monitask/run-monitask.php --template > /var/www/monitask/index.htmlor, if the web folder is configured with specific permissions:
sudo sh -c 'monitask/run-monitask.php --template > /var/www/monitask/index.html'That's it, Monitask is installed, now to finish up you'll need to update some default presets in its ini/monitask-linux.ini file and add it to your crontab file. Proceed to Configuration section.