I have a program that sends logs using the http protocol.
On the web server I have created index.php
<code>
<?php
# only do something if POST data contains 'message'
if ($_POST['message'] != null ) {
# set file name
$filename = "post_".date('U').".txt";
# open file for writing
$file = fopen($filename, "w");
# dump message to file
fwrite($file, print_r($_POST['message'], true));
# close file
fclose($file);
}
</code>
So in the program I have typed that the logs have to send to the address http://example.com/test5
In the test5 directory I have the above-created index.php file created
The logs on the web server register correctly.
Is there a way to collect this data in Zabbix
On the web server I have created index.php
<code>
<?php
# only do something if POST data contains 'message'
if ($_POST['message'] != null ) {
# set file name
$filename = "post_".date('U').".txt";
# open file for writing
$file = fopen($filename, "w");
# dump message to file
fwrite($file, print_r($_POST['message'], true));
# close file
fclose($file);
}
</code>
So in the program I have typed that the logs have to send to the address http://example.com/test5
In the test5 directory I have the above-created index.php file created
The logs on the web server register correctly.
Is there a way to collect this data in Zabbix