Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jun 26, 2019 11:35 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject:
PostPosted: Wed Sep 26, 2007 4:54 am 
Offline
Cacti User
User avatar

Joined: Wed Aug 17, 2005 8:51 am
Posts: 435
Location: UK
Whats the story with SNMP support then?
I just read that Asterisk 1.4 has some built-in support, which I like the idea of much better than AMI scripts. Do you have any links to what it supports polling of?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 7:38 am 
Offline

Joined: Wed Sep 19, 2007 5:31 am
Posts: 11
adrianmarsh wrote:
Whats the story with SNMP support then?
I just read that Asterisk 1.4 has some built-in support, which I like the idea of much better than AMI scripts. Do you have any links to what it supports polling of?


http://www.voipphreak.ca/archives/382


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 8:05 am 
Offline
Cacti User
User avatar

Joined: Wed Aug 17, 2005 8:51 am
Posts: 435
Location: UK
Yeah I've read through that one, but one thing that still seems missing to me is a basic call counter. The problem with measuring attached SIP clients etc in Cacti, is that it only polls every 5 mins, and therefore you can get an incorrect picture.. eg, 100 people attach and detach within that 5 min period, but the graph shows a constant attached status - not indicative of the workload the server might have.

I don't see Channel-call counters in the list, but I've not looked at the MIB yet (still working out how to read them...)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 4:15 am 
Offline
User avatar

Joined: Mon Nov 19, 2007 7:56 pm
Posts: 13
Thanks for the cool script - works like a charm!
Anyway, some edits must be done to make it work in asterisk 1.2 [and not 1.4]

The "show threads" function is not available in asterisk 1.2.. so it can't work.

Line 217: Modify "agent show" to "show agents"
Line 234: Modify "core show uptime seconds" to "show uptime seconds"

And then [i think this IS a bug] - if there is just ONE active iax or sip channel, the string search doesn't work (as it searchs for "channels" and not "channel")

On line 184: Modify "active SIP channels" to "active SIP channel"
On line 189: Modify "active IAX channels" to "active IAX channel"

Maybe the output of asterisk 1.4 is different, i don't know.

Bye!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 11, 2008 7:39 am 
Offline
Cacti User
User avatar

Joined: Wed Aug 17, 2005 8:51 am
Posts: 435
Location: UK
Just upgraded Asterisk from 1.2 to 1.4.. now I get some odd readings from the script for SIP peers:

[[email protected] scripts]# ./asx-stats.py
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted

sip.peers.total:195
sip.peers.online:3
iax.peers.total:2
iax.peers.online:0
sip.users.total:188
iax.users.total:5
sip.channels:0
iax.channels:0
zap.channels:0
iax.peers.ubigradout.status:0
iax.peers.ubigradin.status:0
iax.peers.ubigradouttest.status:0
iax.peers.20005.status:0

From asterisk I get:

202 sip peers [Monitored: 107 online, 91 offline Unmonitored: 3 online, 1 offline]

Whats the difference between "monitored" and "unmonitored" ?


Top
 Profile  
 
 Post subject: zap channel problem
PostPosted: Fri Feb 22, 2008 8:55 am 
Offline

Joined: Fri Feb 22, 2008 8:50 am
Posts: 1
I'm having some problems graphing the "PSTN channels"
when i create the data source and the graph I receive the following error:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="as1 - Asterisk - PSTN channels" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="PSTN channels" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
LINE1:#002A97FF:"channels in use" \
GPRINT::LAST:"Current\:%8.0lf" \
GPRINT::AVERAGE:"Average\:%8.0lf" \
GPRINT::MAX:"Maximum\:%8.0lf\n"

RRDTool Says:

ERROR: parameter '#002A97FF' does not represent a number in line LINE1:#002A97FF:channels in use

also there seems to be a reference to sip channels in "PSTN Channels.xml" graph template
<name>|host_description| - Asterisk - SIP channels</name>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 9:26 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
The DEF statement, referring to a rrd file, is missing. Broken Templates may yield such a result
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: INSTALL Documentation
PostPosted: Wed Mar 12, 2008 8:40 am 
Offline

Joined: Wed Mar 12, 2008 8:36 am
Posts: 4
Location: france
hello every body

( its seems to be a nice application but i really don't understand all from the install file ....
if you have an install documentation with more details it will be very welcome and usefull for me )

FORGET NOW IT'S WORKS !!! :
"[A.FR.2 asx-stats]# ./asx-stats.py 0
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted"

And a lot of others datas

BUT NOTHING apear in cacti graph
one debug for exemple (it's the same for all the templates for asterisk)debug :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="AFR1 - Asterisk - IAX2 channels" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="IAX2 channels" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/html/cacti/rra/afr1_iax_channels_23.rrd":iax_channels:AVERAGE \
DEF:b="/var/www/html/cacti/rra/afr1_iax_channels_23.rrd":iax_channels:MAX \
LINE1:a#002A97FF:"channels in use" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:b:MAX:"Maximum\:%8.0lf\n"
RRDTool Says: OK

If someone have any idea ....
thanks in advance

pascal


Last edited by pascal1024 on Thu Mar 13, 2008 10:08 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Channels
PostPosted: Wed Mar 12, 2008 3:41 pm 
Offline

Joined: Wed Mar 12, 2008 3:40 pm
Posts: 1
Location: Lima, OH
Is there a way to break out this script and make it return the results from, lets say, channels 25-49 instead of from all channels?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 21, 2008 12:13 pm 
Offline

Joined: Fri Mar 21, 2008 12:12 pm
Posts: 2
I have just installed this and when running the script manually all seems ok;

Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted

sip.peers.total:27
sip.peers.online:25
iax.peers.total:0
iax.peers.online:0
sip.users.total:27
iax.users.total:3
sip.channels:0
iax.channels:0
zap.channels:4
iax.peers.gradwellout.status:0


However when trying to view the graphs in Cacti I am just receiving blank/no graphs?

Anyone got any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 21, 2008 2:58 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
As a general help, please visit second link of my signature
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 23, 2008 5:07 pm 
Offline

Joined: Wed Mar 12, 2008 8:36 am
Posts: 4
Location: france
hello
thanks for your answer
i will have a look
pascal


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 26, 2008 7:36 am 
Offline

Joined: Wed Mar 12, 2008 8:36 am
Posts: 4
Location: france
HELLO Reinhard

i check all in your second link ...

here is what i get everytime in the cacti.log :

03/26/2008 01:20:02 PM - CMDPHP: Poller[0] Host[3] DS[15] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:02 PM - CMDPHP: Poller[0] Host[3] DS[16] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:02 PM - CMDPHP: Poller[0] Host[2] DS[12] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:03 PM - CMDPHP: Poller[0] Host[2] DS[13] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:03 PM - CMDPHP: Poller[0] Host[3] DS[17] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:03 PM - CMDPHP: Poller[0] Host[2] DS[42] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:03 PM - CMDPHP: Poller[0] Host[4] DS[23] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:03 PM - CMDPHP: Poller[0] Host[4] DS[24] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:03 PM - CMDPHP: Poller[0] Host[4] DS[25] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:03 PM - CMDPHP: Poller[0] Host[4] DS[28] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:04 PM - CMDPHP: Poller[0] Host[4] DS[29] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/26/2008 01:20:04 PM - SYSTEM STATS: Time:3.3851 Method:cmd.php Processes:3 Threads:N/A Hosts:9 HostsPerProcess:3 DataSources:56 RRDsProcessed:46


the ./asx-stats.py 0 command give me all OK
and i have always no graph in cacti
can you help me ?
thanks in advance
pascal


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 26, 2008 4:53 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
You're on the right track. Switch to DEBUG to find the exact output of the script
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 2:21 pm 
Offline

Joined: Wed Mar 12, 2008 8:36 am
Posts: 4
Location: france
hi here is more log

03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[23] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[23] CMD: /var/www/html/cacti/scripts/asx-stats.py 0 iax.channels, output: U
03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[24] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[24] CMD: /var/www/html/cacti/scripts/asx-stats.py 0 sip.channels, output: U
03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[25] WARNING: Result from CMD not valid. Partial Result: Asterisk Call Manage
03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[25] CMD: /var/www/html/cacti/scripts/asx-stats.py 0 sip.users.total, output: U
03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[26] CMD: perl /var/www/html/cacti/scripts/ping.pl 81.252.162.140, output: 0.728
03/27/2008 08:15:03 PM - CMDPHP: Poller[0] Host[4] DS[27] SNMP: v2: 81.252.162.140, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 232169975

i check the path he is good
here is my iaxpeers file
TR2-AFR1-ADZ3
TR-AFR1-AMD5
TR-AFR1-AMD1
TR-AFR1-AFR2
TR-AFR1-ADZ3
TR-AFR1-ADZ2
TR-AFR1-ADZ1
out-qualitel1
In2-voxbone
In-voxbone


i don't what i can do now
pascal


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group