9. Remote Server Monitoring
Pandora FMS also offers us the possibility ofto monitoringmonitor Linuxcomputers andusing WindowsLinux® serversor MS Windows® operating systems remotely without installingthe aneed to install an EndPoint.
To achieve this, we will need to create remote execution modules that allow youus to askquery the device from yourour Pandora FMS installation by runningexecuting a command (Windows or Linux) remotely and obtaining the desired result.
CreateFor security reasons, authorized user credentials are required for each operating system, so we will first use the Credential Store functionality in PFMS and then create a networkremote module:execution module for each mentioned operating system.
Credential
Then choose a "Remote execution" module. Choose between the following ones depending on the type of data that the check returns (numeric, true/false, alphanumeric or incremental):
To be able to use these modules successfully, you need to have remote connection data to the system you wish to monitor. Therefore, register in the safe credential store the connection data against the target.
The credential store stores user/passwordsaves sets of user/password so that they can be reused in different checkschecks, and whose data areis not shown in the check configuration.
To create an entry inThrough the credential store, go to section "Configuration -> Management→Configuration→Credential store"Store menu, you can access this functionality and must click "Add Key":
Create a "Custom" credential and set the passwordAdd andkey login credentials for your Windows server:button.
First, we will create a credential to connect to a GNU/Debian® (Ubuntu®) computer via SSH:
GoAnd backthen we add a credential for an MS Windows® computer via WMI:
Our credentials should look similar to thethis:
Remote execution modules
Create a remote checkexecution andmodule configureon this:the desired agent:
Youthe willmodule need to filltype, in threethis keycase, fields:
Optionally, the IP of thetarget(if not, the agent's IPwe willbe used).Thecommandthat you will launch to monitor.Theset of credentialsthat you are going to use to connect (that you defined in the previous step).
In Windows environments choose "Windows remote" connection:
The example above will indicate the number of processes running on the remote machine.
To perform the same on Linux servers, just choose the remoteone SSHcorresponding connectionto method,numerical choosedata, portRemote 22execution, andnumeric use a command that returns a number in Linux. The previous example in Linux would be:data:
If you wishwant to monitor something that returns a true/true or false status,state, such as the status of a process,process status, you just makeneed sureto ensure that your command returns 0 for thea wrongfailed value and 1a ornon-zero morevalue for thea rightcorrect value.one. You shouldmust use a BOOLEAN data type (e.g.: "Remote execution, boolean data")data data type so that Pandora FMS interprets it as such.such and omits the use of any thresholds.
Now we are going to configure the check itself and add the commands to be executed to find out the number of processes or tasks that remote computer is running. This value is one of the indications of the workload being performed by the machine in question:
Note that:
- The IP address or URL of the computer to be checked must be entered. This is independent of the IP address that may have been added, if applicable, to the agent containing the module in question.
- Select the appropriate credential in Credential identifier.
The commands to use are:
For Linux®:
ps aux | wc -l
For MS Windows®:
tasklist | find /C /V ""
Lastly, we will establish the warning and critical thresholds. Since the workload a computer can handle depends intrinsically on the hardware used, for instructional purposes we will arbitrarily set 200 to 299 for warning and over 300 to declare the monitored device in a critical state.
DidWe save the module and in a few minutes you will have information similar to the following:
Are you not getachieving the expectedresults results?explained Goin tothis chapter? Access the help or support sections.section.













