Note: Service Monitor is a portal for administrators to observe the health of deployed NetBrain servers (including both Windows servers and Linux servers), with operations management of related services. It is highly recommended to install it on your NetBrain servers that require monitoring. See Monitoring Servers and Services for more details.
1.Log into the Linux server as the root user.
2.Obtain the netbrain-servicemonitoragent-linux-x86_64-rhel7-7.1a2.tar.gz file from NetBrain, and then copy it to the /opt/netbraintemp directory.
▪Option 1: If the Linux server has no access to the Internet, upload the netbrain-servicemonitoragent-linux-x86_64-rhel7-7.1a2.tar.gz file to the /opt/netbraintemp directory by using a file transfer tool.
▪Option 2: If the Linux server has access to the Internet and the yum command has been installed,
1)Run the yum -y install wget command to install the wget command if it has not been installed.
2)Run the cd /opt/netbraintemp command to navigate to the /opt/netbraintemp directory.
3)Run the wget <NetBrain IE 7.1a service monitor agent download link> command under the /opt/netbraintemp directory to directly download the netbrain-servicemonitoragent-linux-x86_64-rhel7-7.1a2.tar.gz file to this directory.
Tip: Contact NetBrain Support Team to get the download link address.
Note: The download link is case-sensitive.
3.Run the tar -zxvf netbrain-servicemonitoragent-linux-x86_64-rhel7-7.1a2.tar.gz command under the /opt/netbraintemp directory to extract installation files.
[root@localhost netbraintemp]# tar -zxvf netbrain-servicemonitoragent-linux-x86_64-rhel7-7.1a2.tar.gz
ServiceMonitorAgent/
ServiceMonitorAgent/agent-7.1a1.tar.gz
ServiceMonitorAgent/fix_releaseinfo.json
ServiceMonitorAgent/install.conf
ServiceMonitorAgent/install.sh
ServiceMonitorAgent/install_monitor.conf
ServiceMonitorAgent/preinstallcomponents/
ServiceMonitorAgent/preinstallcomponents.sh
ServiceMonitorAgent/preinstallcomponents/bzip2-devel-1.0.6-13.el7.x86_64.rpm
...
ServiceMonitorAgent/python3.6.2.tar
ServiceMonitorAgent/uninstall.sh
ServiceMonitorAgent/upgrade.sh
4.Run the cd ServiceMonitorAgent command to navigate to the ServiceMonitorAgent directory.
5.Modify the parameters in the install_monitor.conf file located under the ServiceMonitorAgent directory according to your environment and save the changes. For how to modify the configuration file, see Appendix: Editing a File with VI Editor for more details.
#NetBrain monitor config file
SystemUser netbrain
SystemGroup netbrain
Server_Url http://10.10.3.141/ServicesAPI
Server_Key netbrain
InstallPath /opt/netbrain/nbagent
LogPath /var/log/netbrain/nbagent
VerifyCA no
CA_Path /opt/netbrain/ca.pem
Note: If SSL is enabled with https binding created for the system website in IIS Manager, use https in Server_Url. Besides, if VerifyCA is enabled, hostname must be specified in Server_Url.
6.Run the ./install.sh script under the ServiceMonitorAgent directory to install the Service Monitor Agent.
7.Run the service netbrainagent status command to verify whether its service starts successfully.
[root@localhost ServiceMonitorAgent]# service netbrainagent status
Redirecting to /bin/systemctl status netbrainagent.service
netbrainagent.service - NetBrain Service Monitor Agent Daemon
Loaded: loaded (/usr/lib/systemd/system/netbrainagent.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-11-27 02:35:36 EST; 2min 32s ago
Main PID: 27007 (python3)
Memory: 71.0M
CGroup: /system.slice/netbrainagent.service
27007 /opt/netbrain/nbagent/python/bin/python3 NBAgent.py start
27028 /opt/netbrain/nbagent/python/bin/python3 forwarder.py
27029 /opt/netbrain/nbagent/python/bin/python3 collector.py start
27030 /opt/netbrain/nbagent/python/bin/python3 receiver.py start
8.This step is required only if you changed the default service name when installing MongoDB or Index Server. Add the customized service name to the component.ini file.
1)Run the cd /etc/netbrain/nbagent command to navigate to the nbagent directory.
2)Add your customized service name to the component.ini file located under the nbagent directory and save the changes. Use "|" to separate service names. For how to modify the file, see Appendix: Editing a File with VI Editor for more details.
Example: Add the service name Database to the file.
[mapping]
license = netbrainlicense
stunnel = stunnel|Stunnel
mongodb = mongod|MongoDB|mongod2|mongodnetbrain|Database
elasticsearch = elasticsearch|elasticsearch-service-x64
redis = Redis|redismaster|redisslave|redissentinel|RedisMaster|RedisSlave|RedisSentinel
rabbitmq = rabbitmq|RabbitMQ
iis = W3SVC
taskengine = NetBrainTaskEngine|FlowEngineServices
workerserver = NetBrainWorkerServer|ResourceManager
fsc = NetBrainFrontServerController|NBFrontServerControllerService
fs = NetBrainFrontServer|NBFrontServerService
...
3)Run the systemctl restart netbrainagent command to restart the netbrainagent service.
9.If you changed the default port number or service name when installing a NetBrain server on this machine, to make the Server Monitor can still detect and monitor its service, you must add the customized port number to the corresponding configuration file. See Configuration Files for Port Information for more details.
Parameter |
Default Value |
Description |
---|---|---|
SystemUser |
netbrain |
The system user created on the Linux server to run the service of the Service Monitor Agent. Keep the default name as it is. Note: If you modified the default umask value, make sure this system user has the read and execute permissions to all the directories (including their parent directories) where the Service Monitor Agent is installed. These directories include those that you specify in InstallPath, LogPath, and CA_Path. |
SystemGroup |
netbrain |
The system group created on the Linux server to run the service of the Service Monitor Agent. Keep the default name as it is. |
Server_Url |
http://localhost/ServicesAPI |
The URL used to call the Web API service, http://<IP address of NetBrain Web API Server>/ServicesAPI. For example, http://10.10.3.141/ServicesAPI. Note: If SSL is enabled with https binding created for the system website in IIS Manager, use https in the URL. Besides, if VerifyCA is enabled, hostname must be specified in the URL. |
Server_Key |
netbrain |
The key used to authenticate the connections to your NetBrain Web API Server. Note: The Server_Key must be kept consistent with the key configured in the web.config file located under the <IE_Install_Home>\Web Server\nb_publish_server directory on NetBrain Web API Server. <IE_Install_Home> is the root installation directory of the Web API Server. Here is the related entry in the web.config file. |
InstallPath |
/opt/netbrain/nbagent |
The storage path for all binary and other installation files of the Service Monitor Agent. Note: If you modified the default umask value, you must run the chmod o+rx /opt/netbrain command to assign the read and execute permissions of the /opt/netbrain directory to the system user that you specify in SystemUser. This note also applies to LogPath and CA_Path. |
LogPath |
/var/log/netbrain/nbagent |
The storage path for the log files of the Service Monitor Agent. Note: Don't save the log files under any subfolders of the InstallPath. |
VerifyCA |
no |
Set whether to authenticate the Certificate Authority (CA) of the certificates, which are used to enable SSL for the system website in IIS Manager. Note: It is required only if https is used in Server_Url. |
CA_Path |
/opt/netbrain/netbrain.pem |
The storage path and file name of the root or class 2 CA file used for CA authentication. Note: It is required only if VerifyCA is enabled. Only the CA file in the Base-64 encoded X.509 (.CER) format is supported. |
The Service Monitor Agent checks the following configuration files for the customized port or service name information of NetBrain servers installed on Linux.
Server Name |
File Name |
---|---|
Index Server |
elasticsearch.yaml |
MongoDB Server |
mongodb.yaml |
License Agent Server |
license.yaml |
Front Server |
fs.yaml |
Example: If you configured the port number 27000 and service name Database during MongoDB Server installation, add them to the mongodb.yaml file as follows.
1.Run the cd /etc/netbrain/nbagent/checks command to navigate to the checks directory.
2.Add the customized port number and service name to the mongodb.yaml file, and save the changes. For how to modify the file, see Appendix: Editing a File with VI Editor for more details.
Note: If fully qualified domain name (FQDN) is used when installing MongoDB on this machine, add dns:<MongoDB FQDN> to the mongodb.yaml file.
Note: Follow the text format in the example strictly, including alignment, punctuations, and spaces.
init_config:
instances:
- name: Database
port: 27000