StaffCounter Local Server
The StaffCоunter local server is just like the global server, except that it is located in your office. It has all the same features as the cloud server when it comes to collecting and processing information from computers where the StaffCounter monitoring agent is installed. Advantages of running a local server:
- Corporate data is kept safe;
- Unlimited room for data storage and an unlimited period for storing it;
- Ability to migrate settings.
The local server is installed on a Linux virtual machine under the program VirtualBox.
- Install VirtualBox on a particular computer.
- Download and decompress the archive containing the server in a new folder.
- Inside the archive, you’ll find an .ova file to import the configuration into VirtualBox.
- In the application of Oracle VM VirtualBox Manager choose File -> Import configuration…. Specify the path to the .ova file.
- The local server must be connected to the local network. Open the configuration for the virtual machine and go to Network settings.
- For adapter 1, point to what existing network card the program should connect to.
By default, the local server has a set network address (see the file Readme.txt in the archive). If it is necessary to change it, do the following:
- Launch the virtual machine. Enter the username and password from the file Readme.txt;
- Launch the mc as root:sudo mc;
- Locate the file /etc/netplan/50-cloud-init.yaml and press F4;
- Change the address field and, if necessary, the network mask;
- Save the file (F2);
- You can download the example of this file here
- Restart the virtual machine. To do this, exit the editor (F10) and the Midnight Commander program (F10), and then execute the command:
sudo shutdown -r now
Note: To fully turn the virtual machine off, execute the command
sudo shutdown -h now instead.
In order for the agent installations to properly work with a local server, you must enter the serial number on the main page of the administrator console on the local server. Launch the Mozilla Firefox browser and direct it to the address address_of_local_server/admin Enter the console, using the details from the Readme.txt file. Enter the registration key that you received when purchasing the local server into the field Activate your license and then click Activate. The computer that you are using for this must be connected to the internet.
The monitoring agents for Windows, macOS, and Linux can be downloaded here. Read carefully the instructions for each program before installing. After installing the monitoring program, you must enter changes into the registry (on Windows) or the configuration file (on macOS and Linux).
StaffCounter for Windows
In the installation package, you must edit the file cmdline_install.bat After this, launch this file as the current user.
StaffCounter for Mac OS X
- Before installing StaffCounter for Mac OS X, download this reginfo.plist file and unzip the Archive.
- Transfer this file to the /Library/Application Support/StaffCounter/ folder. If there is no such folder, create it.
- If the IP address of your server is different from the current, then change it and re-save the file.
- Install the StaffCounter program on the computer and restart it.
- Launch the Staffcounter application and connect it to the manager’s account
- Check the receipt of data from the current device to your local server.
StaffCounter PRO for Android
Starting from version 1.6.202 (2.6.22) Staffcounter PRO agent for Android can be connected to any server.
In the settings of the agent, choose the Connect to server option, click Select a server to upload.
Choose Local server. In the next window, enter the address of the server, beginning from “http://” and finishing with “/upload-v2/”
Click OK and then click Your account.
In this window, you can specify the manager’s email and the name of the device. The possibility to specify the name of the device is also a new feature of this version.
StaffCounter for Linux
Download and decompress the distributive. Edit the file /files/staffcounter.conf within the package. In the section, network uncomment the line *URL* and specify the local address of your StaffCounter server. [network] url=http://192.168.1.50:80/upload-v2/
After the installation, launch the Staffcounter agent. At the first launching, it proposes to connect to the server.
By default, there are several manager accounts on the server: firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, where you can connect the monitoring agent to. The list of existing manager accounts you can see in the administrative part of the server, on the Members page. The creation of new managers is possible only in the administrative part of the server.
In the first window of the Staffcounter agent, you have to input the mail address of a manager and then click the Connect to Staffcounter.net button. In the manager’s workspace will appear a new virtual device.
To speed up the statistic update, you need to change the crones’ configuration file home/vagrant/cron/vagrant.
install */1 (one per minute) for the following processes:
– serveDeltaLogs.php –*/5 (once in 5 min)
– wcDevicesStats.php –*/15 (once in 15 min)
Working with the administrator panel
In the file Readme.txt, you will find the username and password for the administrator of the local server. Launch the Mozilla Firefox browser and direct it to address_of_local_server/login Enter the administrator’s username and password.
In the administrator panel, you can add, edit, and remove user accounts on the local server. To do it, select the item Managers in the table on the left. By using the commands Add and Delete you can add or remove a manager, respectively.
Using Edit you can make changes to an account, such as the e-mail address, password, name, or role of the administrator.
In the section Devices, you can delete or edit settings for virtual devices where data is uploaded by the agent programs installed on employee computers.
In this window, you can easily find devices by the manager’s address, the name of the device and its ID, and the place it occupies on the server. Using Edit you can view and change settings for the given virtual device: the maximum amount of data saved on the server, the amount of time for which data is saved, as well as the device type.
In the section Pages, you can add, edit, or remove webpages on the local service without affecting its performance.
After going to the required page, click Edit. A site is made in several languages. Select the required tab and use the built-in editor.
In the section Categories, you can add, edit, and delete categories of applications and websites.
After going to the required category click Edit. Specify the name and degree of productivity for that category.
In the section Applications, you can assign applications a default category. After going to the required application click Edit. Specify the name and category for the program or web address.
The section Monitoring plays a supporting role and consists of the following parts:
- Row logs
Entries in this section relate to sessions when monitoring agents connect and upload data to the server. Each entry contains the client’s time, size of uploaded data, operating system version, agent version, and the virtual device ID.2. Database status This section allows you to see the number of entries in each database table. Using this information you can trace errors in server operation.3. Audit In this window you can track the activities of site administrators when working with user accounts.
You can access the database by going to the address http://192.168.1.51/phpmyadmin/index.php Instead of 192.168.1.51 specify the network address of your local server. Use the username and password from the Readme file.
To send reports and notifications, the local server should use an existing e-mail address. You must create or use an existing e-mail address and enter the username and password for it into the server’s configuration file. Launch the virtual machine, and log into the user account using the username and password provided in the file Readme. Open Midnight Commander. Find the file .env file in the /var/www/client/ or /var/www/staff/ directory and open it for editing. At the end of the file enter your e-mail address and password. Note: mail services use different mail ports and mail host names and you have to specify them as well.
Save the file and restart the server (sudo reboot). To check the connection, create a report, and click on the Twitter icon.
To change the timezone in the docker
1) open staff/ directory and stop the docker:
2) open staff/image/ directory and edit the Dockerfile:
Write America/New_York (or another timezone) into the line:
ln -f -v -s /usr/share/zoneinfo/America/New_York /etc/localtime ; \
But in the data/etc/php.ini you have to write “;” before “date.timezone = Europe/Chisinau”
; date.timezone = Europe/Chisinau
3) open staff/ directory and execute
sudo ./start.sh rebuild
To install the timezone for server
sudo dpkg-reconfigure tzdata
The troubleshooting logs are in the