Asterisk PBX Add-On [Under Constraction]

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

raiten
Posts: 43
Joined: Fri May 12, 2006 12:17 pm

Post by raiten »

on note for permission

you need one entry in your manager like this (with minimum perm)
; cacti
; http://www.voip-info.org/wiki/view/Aste ... nager.conf
[cactiuser]
secret = xxx
deny=0.0.0.0/0.0.0.0
permit=192.168.x.x/255.255.255.0
;read = system,call,log,verbose,command,agent,user
;write = system,call,log,verbose,command,agent,user
;read = command
write = command

and you can report info in the pollcall.php


next is there any new files availables to get more than the graph, for example list of registered users and menus ?

thanks a lot
raiten
Posts: 43
Joined: Fri May 12, 2006 12:17 pm

Post by raiten »

seems cacti, can't graph script output:

in cacti log, i have this
09/02/2006 08:10:32 PM - CMDPHP: Poller[0] Host[17] DS[53] WARNING: Result from CMD not valid. Partial Result:
09/02/2006 08:10:33 PM - CMDPHP: Poller[0] Host[17] DS[54] WARNING: Result from CMD not valid. Partial Result:

but in command line
$ php -q /var/www/cacti/scripts/pollcalls.php
1$
$ php -q /var/www/cacti/scripts/pollcalls.php 2
2$

(same with adding "\n" at the end of the output)

ideas ?
Flu
Posts: 1
Joined: Wed Sep 20, 2006 2:55 pm

Got it working.

Post by Flu »

Thanks for the great code, I finally got it working. Here are some things I had to do in order to make it properly function:
  • Check to make sure the files are owned by the proper user (cactiuser in my case)

    Check to make sure the files have the proper permissions on them (I ran chmod 755 on the php files).

    Inside of the "Data Input Methods" section, make sure that Cacti is pointing towards the proper location of your script. I had to alter this, because the xml template file I imported didn't coincide with the proper location of pollcalls.php on my computer.

    Adjust the input string inside of "Data Input Methods" to include |awk NF on the end of the line. The |awk NF removes any blank lines from the output of the pollcalls.php command. You can run php -q pollcalls.php directly in a terminal to see if it's including a blank line above any numerical output.

    For reference, my Input String is as follows: php -q /var/www/html/cacti/scripts/pollcalls.php <value>|awk NF

    Use System Utilities/View Poller Cache to make sure the input string you entered is actually active. If it isn't, you'll need to use the Clear Poller Cache link to make it active.
I think that about wraps up the things I needed to look into to make sure it worked for me..hopefully the above information was of some use to you.
kruz
Posts: 23
Joined: Tue Sep 19, 2006 2:19 pm

Post by kruz »

could you post any of your output?

or even how you did any of this?

i want to make a script to tell me what calls are passing, and how many...

keep us updated, this is a very interesting project!
krish905
Posts: 2
Joined: Mon Oct 16, 2006 6:37 am

Post by krish905 »

Would you like to check if this is useful?
http://forums.cacti.net/viewtopic.php?t=16773
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

docelmo,

Do you graphs show collective last-5 mins, or just whats active at the scanning time (from A*ks perspective) ?
jobu
Posts: 12
Joined: Mon Nov 13, 2006 5:32 pm

Post by jobu »

Is this still an active project? I have some scripts that monitor asterisk for me through mrtg, but I like look of this.

Question: What username/password combo is supposed to go in the astman.php file?
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

active but very-slow-developing.

I'm in the state of developing the admin panel
kruz
Posts: 23
Joined: Tue Sep 19, 2006 2:19 pm

Post by kruz »

look at the other posts

im developing a real plugin instead of just xml and php scripts ( it might start out as that in early beta though ;], alpha rather )

keep a look out
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Anything new on this?
lftoledo
Posts: 3
Joined: Tue Feb 06, 2007 9:43 am

Post by lftoledo »

Nothing new ?
enjay
Posts: 1
Joined: Mon Feb 12, 2007 4:54 pm

Post by enjay »

All of my channel results return a 0

Asterisk: 1.2.14

I do see the cacti user logging into the Asterisk CLI but returning 0's even though show channels has a ton of open channels.

ideas?

-Art

Code: Select all

[root@cp-db01 scripts]# php -q /var/www/html/mon/scripts/pollcalls.php | awk NF
PHP Notice:  Undefined offset:  -1 in /var/lib/cacti/scripts/pollcalls.php on line 31
PHP Notice:  Undefined offset:  -1 in /var/lib/cacti/scripts/pollcalls.php on line 31
PHP Notice:  Undefined offset:  -1 in /var/lib/cacti/scripts/pollcalls.php on line 31
0

Code: Select all

02/12/2007 03:55:03 PM - CMDPHP: Poller[0] Host[6] DS[17] CMD: php -q /var/www/html/mon/scripts/pollcalls.php  |awk NF, output: 0
02/12/2007 03:55:03 PM - CMDPHP: Poller[0] Host[6] DS[18] CMD: php -q /var/www/html/mon/scripts/pollcalls.php x |awk NF, output: 0
DavidT
Posts: 4
Joined: Sun Mar 18, 2007 1:00 am
Location: Australia & Singapore

Post by DavidT »

Is there any further Progress on this?


I have been lurking in the backgrounds on this watching too see how the development was coming on, is anyone still working on it?


Oh also is it possible if someone can provide a guide on how to install this? and where do the files go :-?

Sorry to ask, i am only new to Cacti and not sure how to get things like this working.


Cheers,


David.
DavidT
Posts: 4
Joined: Sun Mar 18, 2007 1:00 am
Location: Australia & Singapore

Post by DavidT »

Hi all,

I have tried to install this and get it working, but no matter what i do i cant get it too work :S

These are the errors i am getting:


03/20/2007 01:25:05 AM - CMDPHP: Poller[0] Host[9] DS[83] WARNING: Result from CMD not valid. Partial Result:
03/20/2007 01:25:05 AM - CMDPHP: Poller[0] Host[9] DS[82] CMD: php -q /www/<Directory>/www/scripts/pollcalls.php |awk NF, output: U
03/20/2007 01:25:05 AM - CMDPHP: Poller[0] Host[9] DS[82] WARNING: Result from CMD not valid. Partial Result:
03/20/2007 01:25:05 AM - CMDPHP: Poller[0] Host[9] DS[81] CMD: php -q /www/<Directory>/www/scripts/asxcalls.php |awk NF, output: U
03/20/2007 01:25:05 AM - CMDPHP: Poller[0] Host[9] DS[81] WARNING: Result from CMD not valid. Partial Result:
03/20/2007 01:25:05 AM - CMDPHP: Poller[0] Host[9] DS[80] CMD: php -q /www/<Directory>/www/scripts/asxcalls.php |awk NF, output: U
03/20/2007 01:25:05 AM - CMDPHP: Poller[0] Host[9] DS[80] WARNING: Result from CMD not valid. Partial Result:

I believe i have everything pointing to where it should be, i have tried to follow some of the notes on here and pointer but to no avail.

If there is anyone left that is still working with this or knows how to help with this problem, you will have a very greatful person here :wink:


Thank you advance.


Cheers,


David.
crycos
Posts: 5
Joined: Tue Apr 24, 2007 1:24 pm

Post by crycos »

I keep getting this error when importing the graphs :

Error: XML parse error.

Anyone ?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests