Notes - This topic is primarily intended for IT systems administrators -
From version 5.020 or above the event notifier may run as a service (recommended).
A service is a program that runs in the computer background. A service must be installed before it is started and stopped before it is removed.
The service must be stopped before installing updates to the SafetyLink Risk Manager. The service executable is always updated as the main application changes because of database table changes. After updating the service should be restarted.
The Event notifier server for a service is called "HSENotifierC.exe and may run either "local system account" or under an "User account". If using a user account it must have a password. Usage: HseNotifierC.exe [/is] [/rs] [/iss] [/silent] - 'is' install service; 'rs' remove service; 'iss' install and start service; 'rs' remove service.
Batch files to install, start, stop and remove the service are provided in the installation folder.
HSENotifierC-RemoveService.bat
HSENoticierC.exe /is
HSENotifierC-StopService.bat
NET STOP hsenotifier
HSENotifierC-StartService.bat
NET START hsenotifier
HSENotifierC-InstallService.bat
HSENoticierC.exe /is
Installing HSE Notifier as a service on the same server This is straight forward because the service will have access to the folder where the database resides. The service will be set up to run in "Local" mode, meaning it will have access to local folders on the server. It will be an "automatic" service meaning it will be restarted when the server is rebooted and will not require anyone to login.
Locate the SafetyLink Risk Manager installation folder where the service "HSENotifierC.exe" is installed.
To Install the service run HSENotifierC-InstallService.bat .
To Start the service run HSENotifierC-StartService.bat .
To Stop the service run HSENotifierC-StopService.bat
To Remove the service run HSENotifierC-InstallService.bat
The service will be "automatic" meaning it will be started or restarted when the server is rebooted.
Installing HSE Notifier as a service on different serverThe event notifier service starts automatically when the computer boots. If it is installed on a server other than the one containing the H&S Compliance Manager database, the service needs the access rights of a user account to access the SafetyLink Risk Manager database folder. This is achieved by following the guidelines below:
Ensure there is a user account that has access to the SafetyLink Risk Manager database folder on the other server
Log on as this user to the server where the service is to run
Run Windows services manager from Windows Start / Control panel / Administrative tools / Services
Locate the service (display name "HSE Event Notifier"), right click and select properties
In General tab, check the path to the executable and the "Startup type" is Automatic
In Log On tab, change Log on from "Local System" to "This account"
Key account user name eg: .\Administrator and password / repeat password. You may need ".\" before the account name
Press Apply button
In General tab press Start to start the service then OK. Check that the service is started
Close Services. The service will be "automatic" meaning it will be started or restarted when the server is rebooted.
To Start the service run HSENotifierC-StartService.bat .
Starting HSE event notifier serviceThe event notifier server service is installed as "Automatic", meaning it will start automatically each time the server starts.
To start or restart the service manually, use any of these methods:
run HSENotifierC-StartService.bat - or
From Windows Service manager (Start / Control panel / Administrative tools / Services). Locate the installed service with display name HSE Event Notifier and right click over it and select Start - or
From Windows command prompt run Net Start hsenotifier and press enter. The name of the service is "hsenotifier" and this name is used starting or stopping the service from the command line.
Stopping an event notifier process or serviceTo stop an event notifier (process or service) manually from outside of the SafetyLink Risk Manager use any of these methods:
run HSENotifierC-StopService.bat -or
From Windows Service manager (Start / Control panel / Administrative tools / Services). Locate the installed service with display name HSE Event Notifier and right click over it and select Stop - or
From Windows command prompt run Net Stop hsenotifier and press enter. The name of the service is "hsenotifier" and this name is used starting or stopping the service from the command line.
To stop a single event notifier (process or service) manually from the SafetyLink Risk Manager
Log in to SafetyLink Risk Manager
Select Company Data
from the Toolbar or menu Edit / Company details
Select the Event Notification Server tab
Press the Started Event Notification Servers button
Highlight Notification Server to stop
pressShutdown highlighted email notification server button
Wait for 15 or 20 seconds then press the Refresh list button to verify the selected event notification server has stopped
Close the display and exit the Company details.
To stop ALL event notifier (processes or services) manually from the SafetyLink Risk Manager
Select Company Data
from the Toolbar or menu Edit / Company details.
Select the Event Notification Server tab.
Tick ON Event notification server shutdown - will cause all event notification servers to shut down or stop.
Press OK to save the setting and wait 15 - 20 seconds.
To enable ANY event notifier to be restarted again (after ALL event notifiers were stopped as above):
Select Company Data
from the Toolbar or menu Edit / Company details.
Select the Event Notification Server tab.
Tick OFF Event notification server shutdown.
Press OK to save the setting.
Then see starting the event notifier as a service.
Checking Event notifier serviceThe event notifier looks at the database to determine when emails should be sent and to whom. These are set in the rules for each event type. When the event notifier determines an email should be sent it tries to determine from the rules the person or people to send the email to then looks in their staff records to get their work email address. If it can not find a valid address the email will be sent to the System Administrator (defined in the Company Data).
The first place to check to determine that the email notification service is running is by going to Company Data, selecting the Email Notifier tab, pressing the button to see email notifiers and then check the date and time of the entry. If there is no entry in the list the email notifier is not running. If there is an entry you can see the computer it is running on. By pressing the refresh button with 5 second intervals you can determine if the time is changing. If it is changing the email event notifier is running. If it is not changing, either the email event notifier is not running or it has stopped or hung. If it has stopped, delete the notifier record, wait 5 or 10 seconds then press refresh. If the notifier record reappears, it is running. If not it has either stopped or is hung up for some reason.
If the email notifier is running then it is time to check the emails being sent. At the time the email notifier attempts to send the email, it updates the email address of the recipient and this may be verified by checking the email events in the calendar for the event. If the email is sent successfully to the smtp email server the date and time the email was sent is updated in the calendar in the particular email notification. If an error occurs the date and time is not updated and the error is placed in the calendar for the email notification.
Checks:
In the event notification tab in the Company setup check the SMTP server is correct. If the server requires an authenticated user or not. Often within an organisation user authentication is not required in which case the user, password and 'Helo' are not required. Also ensure the Notification Server wait Seconds is not set to zero (which prevents emails from being sent).
In the H & S Options tab in Company setup ensure there is a Safety co-ordinator selected from the employees. Also check that the employee selected has an email address in their staff record Work Details tab.
Ensure there are event types selected that actually do generate emails. See Setting up system-generated events. A good example to use is the 'Action' event with emails sent to the subject on creation. Then create a new general action from the Actions toolbar entry.
If all else fails temporarily turn on error logging in the event notifier. After you have finished turn off error logging.
Note: Logging will significantly degrade performance so ensure it is tuned off after testing.
Ensure the event notifier has been started at least once.
Edit file QSE.INI in the SafetyLink Risk Manager installation folder and locate the [Notifier] section. You should see some lines like those below starting in column 1:
[Notifier]
COMPUTERNAME-Version=8.040
COMPUTERNAME-Started=NO
COMPUTERNAME-Service=YES
Add the line below (beginning in column 1)
COMPUTERNAME-Log=YES
Notes
1. COMPUTERNAME is the computer the email notifier process or service was started on.
2. The case should be exactly as above.
Optionally add a line specifying the name of the log file to save the conversation with the server (this is not necessary as the default file name is 'Notifier-COMPUTERNAME.Log ' saved in the same folder as QSE.INI)
ADMINISTRATOR-LogFile=c:\mylogfile.log
Save QSE.INI. Note after changing QSE.INI the event notifier must be restarted for the changes to take effect.
After starting the event notifier log file will contain the latest error.
Edit file QSE.INI in the SafetyLink Risk Manager installation folder and locate the [Notifier] section
Delete or change the line COMPUTERNAME-Log=YES to
COMPUTERNAME-Log=NO
Save QSE.INI. Note after changing QSE.INI the event notifier must be restarted for the changes to take effect.