mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	zulip_ops: Use nagios user for all Nagios checks.
There's no reason these Nagios checks needs to run as the semi-priviliged Zulip user.
This commit is contained in:
		@@ -68,7 +68,7 @@ define command{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
        command_name    check_user_zephyr_mirror_liveness
 | 
					        command_name    check_user_zephyr_mirror_liveness
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
@@ -83,22 +83,22 @@ define command{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
        command_name    check_send_receive_time
 | 
					        command_name    check_send_receive_time
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --nagios --site=https://$HOSTADDRESS$'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --nagios --site=https://$HOSTADDRESS$'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
        command_name    check_queue_worker_errors
 | 
					        command_name    check_queue_worker_errors
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_queue_worker_errors'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_queue_worker_errors'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
        command_name    check_postgres
 | 
					        command_name    check_postgres
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -p 22 -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_common/check_postgres.pl --dbname=$ARG1$ --dbuser=$ARG2$ --action $ARG3$'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -p 22 -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_common/check_postgres.pl --dbname=$ARG1$ --dbuser=$ARG2$ --action $ARG3$'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
        command_name    check_postgres_alert_args
 | 
					        command_name    check_postgres_alert_args
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -p 22 -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_common/check_postgres.pl --dbname=$ARG1$ --dbuser=$ARG2$ --action $ARG3$ --warning="$ARG4$" --critical="$ARG5$"'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -p 22 -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_common/check_postgres.pl --dbname=$ARG1$ --dbuser=$ARG2$ --action $ARG3$ --warning="$ARG4$" --critical="$ARG5$"'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
@@ -108,12 +108,12 @@ define command{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
        command_name    check_rabbitmq_queues
 | 
					        command_name    check_rabbitmq_queues
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_rabbitmq_queues'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_rabbitmq_queues'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
        command_name    check_rabbitmq_consumers
 | 
					        command_name    check_rabbitmq_consumers
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -p 22 -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_rabbitmq_consumers $ARG1$'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -p 22 -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_rabbitmq_consumers $ARG1$'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
@@ -138,7 +138,7 @@ define command {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
define command {
 | 
					define command {
 | 
				
			||||||
        command_name    check_fts_update_log
 | 
					        command_name    check_fts_update_log
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_appdb/check_fts_update_log'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_appdb/check_fts_update_log'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command {
 | 
					define command {
 | 
				
			||||||
@@ -148,17 +148,17 @@ define command {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
define command {
 | 
					define command {
 | 
				
			||||||
        command_name    check_postgres_backup
 | 
					        command_name    check_postgres_backup
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_common/check_postgres_backup'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_common/check_postgres_backup'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command {
 | 
					define command {
 | 
				
			||||||
        command_name    check_email_deliverer_process
 | 
					        command_name    check_email_deliverer_process
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_email_deliverer_process'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_email_deliverer_process'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command {
 | 
					define command {
 | 
				
			||||||
        command_name    check_email_deliverer_backlog
 | 
					        command_name    check_email_deliverer_backlog
 | 
				
			||||||
        command_line    /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_email_deliverer_backlog'
 | 
					        command_line    /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_email_deliverer_backlog'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
@@ -168,7 +168,7 @@ define command{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
       command_name     check_worker_memory
 | 
					       command_name     check_worker_memory
 | 
				
			||||||
       command_line    /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_worker_memory'
 | 
					       command_line    /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_app_frontend/check_worker_memory'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define command{
 | 
					define command{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user