完善app告警信息;

增加基于ADC硬件机框ID作为设备sn功能.
This commit is contained in:
lijia
2020-01-20 09:40:51 +08:00
parent 45ab086f27
commit b72efa677a
25 changed files with 299 additions and 45 deletions

View File

@@ -89,5 +89,5 @@ local7.* /var/log/boot.log
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
.notice @@192.168.100.5:514
*.warning @@192.168.100.5:514
# ### end of the forwarding rule ###

View File

@@ -65,7 +65,7 @@ sleep_for_time_ms(){
while [ 1 ]; do
start_time=`get_current_time_in_ms`
echo tsg-monitor start at `date +"%Y/%m/%d, %H:%M:%S.%N"` >> /tmp/tsg-monitor.log
#echo tsg-monitor start at `date +"%Y/%m/%d, %H:%M:%S.%N"` >> /tmp/tsg-monitor.log
start_background_cmd
sleep 10

View File

@@ -17,6 +17,13 @@
src: "{{ role_path }}/templates/tsg_sn.json.j2"
dest: /opt/tsg/etc/tsg_sn.json
tags: template
when: not use_chassis_hardware_sn | bool
- name: "copy tsg_sn.json to destination server"
synchronize:
src: "{{ role_path }}/../tsg-common-files/tsg_sn.json"
dest: "/opt/tsg/etc/tsg_sn.json"
when: use_chassis_hardware_sn | bool
- name: "copy tsg-monitor.service to destination server"
synchronize:
@@ -34,14 +41,20 @@
src: "{{ role_path }}/files/tsg-monitor.sh"
dest: "/opt/tsg/tsg-monitor/"
mode: 0755
- name: "enable tsg-monitor service"
systemd:
name: tsg-monitor
enabled: yes
daemon_reload: yes
- name: "copy rsyslog.conf to destination server"
synchronize:
src: "{{ role_path }}/files/rsyslog.conf"
dest: "/etc/"
dest: "/etc/"
- name: "restart rsyslog service"
systemd:
name: rsyslog
state: restarted
- name: "enable tsg-monitor service"
systemd:
name: tsg-monitor
enabled: yes
daemon_reload: yes
state: restarted