So, what we are doing here, do you need any logs or you need any more info related webpage. ?
One more updates it's jave frame work / jave script based.
Is webi inject will act as web browser driver??
How to monitor URL webpage content.
Re: How to monitor URL webpage content.
Sorry for being unclear.
I need you to run these command on the server, capture the output and send it to me
This is to diagnose the problem. The results from the above commands will
tell us where to look for the root cause of the issue.
Thanks
I need you to run these command on the server, capture the output and send it to me
Code: Select all
cd /usr/local/nagiosxi/etc/components/webinject/
cp /tmp/test.xml .
./webinject.pl test.xmltell us where to look for the root cause of the issue.
Thanks
-
informatica
- Posts: 99
- Joined: Thu Jan 28, 2021 9:55 pm
Re: How to monitor URL webpage content.
Hi Team,
Please find the below update. Let me know if you need more details.
[root@ittestnagiosxi ~]# cat /tmp/test.xml
<testcases repeat="1">
<case
id="1"
url="https://status.salesforce.com/alias/infa/"
verifyresponsecode="200"
verifypositive="HISTORY"
errormessage="HISTORY string not found"
logrequest="no"
logresponse="no"
/>
</testcases>
[root@ittestnagiosxi ~]# cd /usr/local/nagiosxi/etc/components/webinject
[root@ittestnagiosxi webinject]# ls
http.log results.xml status_salesforce_com__URL_Content__testdata.xml status_salesforce_com__Web_Transaction_testdata.xml
results.html status_salesforce_com__URL_Content__config.xml status_salesforce_com__Web_Transaction_config.xml webinject.pl
[root@ittestnagiosxi webinject]# cp /tmp/test.xml .
[root@ittestnagiosxi webinject]# ls test.xml
test.xml
[root@ittestnagiosxi webinject]# ll
total 92
-rw-r--r-- 1 root nagios 0 May 21 19:04 http.log
-rw-r--r-- 1 root nagios 715 May 21 19:04 results.html
-rw-r--r-- 1 root nagios 11 May 21 19:04 results.xml
-rw-r--r-- 1 apache nagios 217 May 19 11:13 status_salesforce_com__URL_Content__config.xml
-rw-r--r-- 1 apache nagios 254 May 19 11:13 status_salesforce_com__URL_Content__testdata.xml
-rw-r--r-- 1 apache nagios 220 May 21 15:05 status_salesforce_com__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios 266 May 21 15:05 status_salesforce_com__Web_Transaction_testdata.xml
-rw-r--r-- 1 root nagios 253 May 25 09:45 test.xml
-rwxr-xr-x 1 apache nagios 63271 Oct 21 2020 webinject.pl
[root@ittestnagiosxi webinject]# ./webinject.pl test.xml
Starting WebInject Engine...
-------------------------------------------------------
Test: test.xml - 1
Verify : "HISTORY"
Verify Response Code: "200"
Failed Positive Verification
Passed HTTP Response Code Verification
TEST CASE FAILED : HISTORY string not found
Response Time = 1.149 sec
-------------------------------------------------------
Start Time: Tue May 25 09:46:12 2021
Total Run Time: 1.202 seconds
Test Cases Run: 1
Test Cases Passed: 0
Test Cases Failed: 1
Verifications Passed: 1
Verifications Failed: 1
[root@ittestnagiosxi webinject]#
Please find the below update. Let me know if you need more details.
[root@ittestnagiosxi ~]# cat /tmp/test.xml
<testcases repeat="1">
<case
id="1"
url="https://status.salesforce.com/alias/infa/"
verifyresponsecode="200"
verifypositive="HISTORY"
errormessage="HISTORY string not found"
logrequest="no"
logresponse="no"
/>
</testcases>
[root@ittestnagiosxi ~]# cd /usr/local/nagiosxi/etc/components/webinject
[root@ittestnagiosxi webinject]# ls
http.log results.xml status_salesforce_com__URL_Content__testdata.xml status_salesforce_com__Web_Transaction_testdata.xml
results.html status_salesforce_com__URL_Content__config.xml status_salesforce_com__Web_Transaction_config.xml webinject.pl
[root@ittestnagiosxi webinject]# cp /tmp/test.xml .
[root@ittestnagiosxi webinject]# ls test.xml
test.xml
[root@ittestnagiosxi webinject]# ll
total 92
-rw-r--r-- 1 root nagios 0 May 21 19:04 http.log
-rw-r--r-- 1 root nagios 715 May 21 19:04 results.html
-rw-r--r-- 1 root nagios 11 May 21 19:04 results.xml
-rw-r--r-- 1 apache nagios 217 May 19 11:13 status_salesforce_com__URL_Content__config.xml
-rw-r--r-- 1 apache nagios 254 May 19 11:13 status_salesforce_com__URL_Content__testdata.xml
-rw-r--r-- 1 apache nagios 220 May 21 15:05 status_salesforce_com__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios 266 May 21 15:05 status_salesforce_com__Web_Transaction_testdata.xml
-rw-r--r-- 1 root nagios 253 May 25 09:45 test.xml
-rwxr-xr-x 1 apache nagios 63271 Oct 21 2020 webinject.pl
[root@ittestnagiosxi webinject]# ./webinject.pl test.xml
Starting WebInject Engine...
-------------------------------------------------------
Test: test.xml - 1
Verify : "HISTORY"
Verify Response Code: "200"
Failed Positive Verification
Passed HTTP Response Code Verification
TEST CASE FAILED : HISTORY string not found
Response Time = 1.149 sec
-------------------------------------------------------
Start Time: Tue May 25 09:46:12 2021
Total Run Time: 1.202 seconds
Test Cases Run: 1
Test Cases Passed: 0
Test Cases Failed: 1
Verifications Passed: 1
Verifications Failed: 1
[root@ittestnagiosxi webinject]#
Re: How to monitor URL webpage content.
I labbed this up and webinject isn't going to work for this as webinject doesn't run the javascript on the page, you can post and read returned information but it won't run the javascript.
I found this 3rd party one that you can try but you would need to setup a separate selenium server (don't install selenium and it's requirements on the XI server) with NCPA installed on it, then you can run the plugin through NCPA:
https://github.com/PawelSuwinski/check_selenium_docker
https://support.nagios.com/kb/article/n ... a-722.html
I found this 3rd party one that you can try but you would need to setup a separate selenium server (don't install selenium and it's requirements on the XI server) with NCPA installed on it, then you can run the plugin through NCPA:
https://github.com/PawelSuwinski/check_selenium_docker
https://support.nagios.com/kb/article/n ... a-722.html