| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/ |
Upload File : |
o
;j� � @ s� d Z ddlZddlZddlZe�e�ZdZdd� Zddd �Z d
d� Z
dd
� Zddd�Zddd�Z
ddd�Zdd� Zdd� Zdd� Zdd� ZdS )zA
Run nagios plugins/checks from salt and get the return as data.
� Nz/usr/lib/nagios/plugins/c C s t j�t�rdS dS )z3
Only load if nagios-plugins are installed
Znagios)FzOThe nagios execution module cannot be loaded: nagios-plugins are not installed.)�os�path�isdir� PLUGINDIR� r r �G/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/nagios.py�__virtual__ s r � �cmd.retcodec C s4 i }t � }| |v rt| t� | � d|� �dd�}|S )z`
Execute nagios plugin if it's in the directory with salt command specified in run_type
� F)Zpython_shell)�list_plugins�__salt__r )�plugin�args�run_type�dataZall_pluginsr r r �_execute_cmd s
r c
C s� t d | �}i }|D ]3}i ||<