Please, take the template from the branch for your version
Ad Widget
Collapse
Discussion thread for official Zabbix Template Asterisk
Collapse
X
-
Please, take the template from the branch for your version
https://git.zabbix.com/projects/ZBX/...Frelease%2F5.2
error reason for "502ee1e6-434d-4e98-2bdf-caeaec4f09cd:asterisk.get_stats" changed: Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/13.23.1..Date: Fri, 13 Nov 2020 10:59:03 GMT..Cache-Control: no...
1. Failed: Request failed with message Follows. Check debug log for more information.Comment
-
Look at the Zabbix server log
error reason for "502ee1e6-434d-4e98-2bdf-caeaec4f09cd:asterisk.get_stats" changed: Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/13.23.1..Date: Fri, 13 Nov 2020 10:59:03 GMT..Cache-Control: no...
1. Failed: Request failed with message Follows. Check debug log for more information.Comment
-
From my Zabbix server debug log:
Code:13192:20201117:143543.821 [ Asterisk ] Received response with status code 200 Response: Error Message: No endpoints found 13192:20201117:143543.821 End of zbx_es_execute():FAIL Request failed with message Error. Check debug log for more information. 13192:20201117:143543.821 worker_preprocess_value(): HTTP/1.1 200 OK Server: Asterisk/16.8.0 Date: Tue, 17 Nov 2020 11:36:13 GMT Cache-Control: no-cache, no-store Content-type: text/plain Set-Cookie: mansession_id="c2bcab22"; Version=1; Max-Age=60 Pragma: SuppressEvents Content-Length: 55 13192:20201117:143543.821 worker_preprocess_value: FAIL Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/16.8.0..Date: Tue, 17 Nov 2020 11:36:13 GMT..Cache-Control: no-... 1. Failed: Request failed with message Error. Check debug log for more information.
I added pjsip extention and it worked!
In another installation of an asterisk, I get this error:
I edited the template:Code:20734:20201117:151833.855 [ Asterisk ] Sending request: http://192.168.10.3:8088/rawman?action=command&command=core%20show%20channe ls 20734:20201117:151833.859 [ Asterisk ] Received response with status code 200 Response: Follows Privilege: Command Channel Location State Application(Data) 0 active channels 0 active calls 229 calls processed --END COMMAND-- 20734:20201117:151833.859 End of zbx_es_execute():FAIL Request failed with message Follows. Check debug log for more information.
And it worked!if (match !== null && match[1] !== 'Success' && match[1] !== 'Goodbye' && match[1] !== 'Follows') {Last edited by bot123; 17-11-2020, 18:29.Comment
-
Ah! Thank you - might be worth the Zabbix people updating that page as master still has version 5.2 in the template.
Please, take the template from the branch for your version
https://git.zabbix.com/projects/ZBX/...Frelease%2F5.2
Still not got it to work, but different error now which I'll work through.
Seems to be disliking the CoreSettings call. (despite the user having full permissions to AMI) Asterisk version 16.Last edited by benjicx; 17-11-2020, 17:57.Comment
-
SOLVED
For anyone finding this and being a freepbx user, you will need to specify the user in manager_custom.conf as the freepbx GUI doesn't given the "all" permission to the Manager user.
Comment
-
I configured the asterisk and template according to the manual, and I get a response from the zabbix cli:
curl "http://pbxip:8088/asterisk/rawman?action=login&username=zabbix&secret=passwor d"
Response: Success
Message: Authentication accepted
but nothing works except "Service response time" and "Service status", but this is just a port check and works regardless of the template settings
there is an error in the zabbix logs:
1275:20201118:194043.423 error reason for "PBX:asterisk.get_stats" changed: Preprocessing failed for: HTTP/1.1 200 OK..Server: Asterisk/16.13.0..Date: Wed, 18 Nov 2020 16:40:38 GMT..Cache-Control: no...
1. Failed: ReferenceError: identifier 'HttpRequest' undefined
at [anon] (duktape.c:81729) internal
at [anon] (function:6) preventsyield
What's wrong?Comment
-
Comment
-
I haven't had any luck getting an external zabbix server to monitor a freepbx box. I'm getting the "problem": Asterisk: Failed to fetch AMI page (or no data for 30m)
I have opened the firewall ports. Excluded the zabbix server public ip from the freepbx firewall.
I set the following in the /etc/asterisk/manager.conf & /etc/asterisk/manager_custom.conf
webenabled = yes
[zabbix]
secret = password
read = system,call,log,verbose,command,agent,user,origina te
write = system,call,log,verbose,command,agent,user,origina te
My zabbix server is running 5.2.1
I'm using the template from: zabbix-feature-DEV-1559-5.2@c8f25bf6661
I have the 4 macros in the ZABBIX host set :
{$AMI.PORT} : 8088
{$AMI.SECRET} : password
{$AMI.URL} : http://asterisk.server.com:8088/asterisk/rawman
{$AMI.USERNAME} : zabbix
Any help would be appreciated.
Comment
-
curl "http://pbxip.com:8088/asterisk/rawman?action=login&username=zabbix&secret=passwor d"
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr />
curl "http://pbxip.com:8088/rawman?action=login&username=zabbix&secret=passwor d"
Response: Success
Message: Authentication accepted
After changing: 8088/asterisk/rawman to 8088/rawman I was able to get the Success response back. I updated the macro:
{$AMI.URL} : http://asterisk.server.com:8088/rawman
Unfortunately still getting: Asterisk: Failed to fetch AMI page (or no data for 30m)
What "Interface" should be setup for the host? SNMP or Agent? I thought this version doesn't require the zabbix agent to be installed on the freepbx box.
Comment
-
After deleting the template and using this version it appears to be working: https://git.zabbix.com/projects/ZBX/...Frelease%2F5.2Comment
-
When I use this vertion of template works only "Service response time", "Service status"After deleting the template and using this version it appears to be working: https://git.zabbix.com/projects/ZBX/...Frelease%2F5.2
And I have an error "Response code "404" did not match any of the required status codes "200""
Also in Zabbix I have: Asterisk: Failed to fetch AMI page (or no data for 30m)
I get response from zabbix and freepbx server
curl "http://address:8088/asterisk/rawman?action=login&username=Zabbix&secret=passwd"
404 Not Found
P.S. the firewall is turn off....Last edited by Step.Alexander; 25-11-2020, 09:26.Comment
-
The problem was solved.
I turned on mini-HTTP Server in freepbx through GUI. But forgot to add "webenabled=yes" to "manager.conf"Comment
Comment