Enter data to PHP script or SH in Nagios
<?php
fwrite(STDOUT, "Enter your name\n"); // Output - prompt user
$name = fgets(STDIN); // Read the input
fwrite(STDOUT, "Hello $name"); // Output - Some text
exit(0); // Script ran OK
?>
OR
#!/bin/bash
echo -n "Enter the first value :"
read op1
echo -n "Enter the first value :"
read op2
Nagios version is:
Nagios XI Version : 2014R2.6
Linux version is
x86_64
Red Hat Enterprise Linux Server release 7.0 (Maipo)
Gnome
Enter data to PHP script or SH in Nagios
-
monitoreo1
- Posts: 124
- Joined: Wed Feb 18, 2015 10:41 am
Re: Enter data to PHP script or SH in Nagios
Do you have a specific question or are you just sharing information?
Former Nagios employee
-
monitoreo1
- Posts: 124
- Joined: Wed Feb 18, 2015 10:41 am
Re: Enter data to PHP script or SH in Nagios
I have a php script that I run with action to pass a data and process it as an argument from another shell script
https://drive.google.com/file/d/0B20mP- ... sp=sharing
By submitting the information for validation it is not running
https://drive.google.com/file/d/0B20mP- ... sp=sharing
https://drive.google.com/file/d/0B20mP- ... sp=sharing
By submitting the information for validation it is not running
https://drive.google.com/file/d/0B20mP- ... sp=sharing
-
monitoreo1
- Posts: 124
- Joined: Wed Feb 18, 2015 10:41 am
Re: Enter data to PHP script or SH in Nagios
You can close the topic.
Thanks
Thanks