Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Asterisk and MRTG, a little help please...


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
jmr.richardson at gmai...
Guest





PostPosted: Sun Jan 27, 2008 4:36 pm    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

Hi All,

After reading the sparse info and attempting to get this running, I'm
unsuccessful and could use some guidance.

I already have a MRTG server up and running serving hundreds of router
interface graphs. I would like to add SIP/IAX channel graphs for all
our asterisk servers. I'm running asterisk 1.2 and MRTG 2.4.17. I
tried the script from http://karlsbakk.net/asterisk/ but get errors
that MRTG does not recognize the first few lines, so I think I'm
running into MRTG version compatibility issues.

Can anyone send me the MRTG scripts that may work with this setup?

Thanks.

JR
--
JR Richardson
Engineering for the Masses
Back to top
andres at telesip.net
Guest





PostPosted: Sun Jan 27, 2008 6:56 pm    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

JR Richardson wrote:

Quote:
Hi All,

After reading the sparse info and attempting to get this running, I'm
unsuccessful and could use some guidance.

I already have a MRTG server up and running serving hundreds of router
interface graphs. I would like to add SIP/IAX channel graphs for all
our asterisk servers. I'm running asterisk 1.2 and MRTG 2.4.17. I
tried the script from http://karlsbakk.net/asterisk/ but get errors
that MRTG does not recognize the first few lines, so I think I'm
running into MRTG version compatibility issues.

Can anyone send me the MRTG scripts that may work with this setup?



I have the exact same script from that web page and it runs fine on
Asterisk 1.2 and MRTG 2.9.29 (default RH ES3.0 install). I also have
other servers on RH9 and MRTG 2.10.13 running without issue as well.
What errors are you getting?

Andres.
http://www.neuroredes.com

Quote:
Thanks.

JR

Back to top
alejandro.acosta at co...
Guest





PostPosted: Mon Jan 28, 2008 9:31 am    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

JR,
That script runs fine. You should be able to run it first manually, if so
please copy and paste the error.

Thanks,

Alejandro,
Quote:

After reading the sparse info and attempting to get this running, I'm
unsuccessful and could use some guidance.

I already have a MRTG server up and running serving hundreds of router
interface graphs. I would like to add SIP/IAX channel graphs for all
our asterisk servers. I'm running asterisk 1.2 and MRTG 2.4.17. I
tried the script from http://karlsbakk.net/asterisk/ but get errors
that MRTG does not recognize the first few lines, so I think I'm
running into MRTG version compatibility issues.

Can anyone send me the MRTG scripts that may work with this setup?

Thanks.

JR
--
JR Richardson
Engineering for the Masses

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jmr.richardson at gmai...
Guest





PostPosted: Mon Jan 28, 2008 11:25 am    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

Quote:
Quote:
After reading the sparse info and attempting to get this running, I'm
unsuccessful and could use some guidance.

I already have a MRTG server up and running serving hundreds of router
interface graphs. I would like to add SIP/IAX channel graphs for all
our asterisk servers. I'm running asterisk 1.2 and MRTG 2.4.17. I
tried the script from http://karlsbakk.net/asterisk/ but get errors
that MRTG does not recognize the first few lines, so I think I'm
running into MRTG version compatibility issues.

Can anyone send me the MRTG scripts that may work with this setup?



I have the exact same script from that web page and it runs fine on
Asterisk 1.2 and MRTG 2.9.29 (default RH ES3.0 install). I also have
other servers on RH9 and MRTG 2.10.13 running without issue as well.
What errors are you getting?

Unknown option: h
Unknown option: 1
Unknown option: 2
ERROR: Line 3 (use strict;) in CFG file (10.10.14.102.cfg) does not make sense

I named the script file the IP address of the server.cfg instead of
asterisk-mrtg.

I call the script from the command line:

# env LANG=C /usr/bin/mrtg 10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2

JR
--
JR Richardson
Engineering for the Masses
Back to top
andres at telesip.net
Guest





PostPosted: Mon Jan 28, 2008 2:09 pm    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

Quote:

Unknown option: h
Unknown option: 1
Unknown option: 2
ERROR: Line 3 (use strict;) in CFG file (10.10.14.102.cfg) does not make sense

I named the script file the IP address of the server.cfg instead of
asterisk-mrtg.

I call the script from the command line:

# env LANG=C /usr/bin/mrtg 10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2



The problem is that is not how its supposed to work. The file is just a
script that you need to run from withing a regular mrtg.cfg file.
So first you build a regular mrtg.cfg file and test it out with
something you are used to like Ethernet Traffic or whatever. Then you
add something like this at the bottom:

Title[servername]: Server title
PageTop[servername]: <h1>servername.domain.com</h1>
Target[servername]: `/usr/local/bin/asterisk-mrtg -h
servername.domain.com -1 SIP -2 IAX2`
Options[servername]: gauge,integer
MaxBytes[servername]: 90
YLegend[servername]: Active channels

...You see the Target Line...Thats where the perl script from
http://karlsbakk.net/asterisk/ goes. It is not an MRTG config file as
you have tried to use it.

Andres
http://www.neuroredes.com


Quote:
JR

Back to top
jmr.richardson at gmai...
Guest





PostPosted: Mon Jan 28, 2008 3:01 pm    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

Quote:
6. Re: > That script runs fine. You should be able to run it first manually, if so
please copy and paste the error.

mrtg:/var/www/mrtg# env LANG=C /usr/bin/mrtg
2008-01-28 11:16:01: WARNING: Could not get any data from external
command '/var/mrtg/10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2'
Maybe the external command did not even start. (Illegal seek)

2008-01-28 11:16:01: WARNING: Problem with External get
'/var/mrtg/10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2':
Expected a Number for 'in' but nothing'

2008-01-28 11:16:01: WARNING: Problem with External get
'/var/mrtg/10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2':
Expected a Number for 'out' but nothing'

2008-01-28 11:16:01: ERROR: Target[asterisklab2][_IN_] '
$target->[0]{$mode} ' did not eval into defined data
2008-01-28 11:16:01: ERROR: Target[asterisklab2][_OUT_] '
$target->[0]{$mode} ' did not eval into defined data
ntcp-mrtg:/var/www/mrtg#

I can see the script log into the manager interface on the asterisk
server at 10.10.14.102, and there are active SIP channels during
script execution.

Any ideas?

Thanks.
JR
--
JR Richardson
Engineering for the Masses
Back to top
andres at telesip.net
Guest





PostPosted: Mon Jan 28, 2008 4:02 pm    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

JR Richardson wrote:

Quote:
Quote:
6. Re: > That script runs fine. You should be able to run it first manually, if so
please copy and paste the error.



mrtg:/var/www/mrtg# env LANG=C /usr/bin/mrtg
2008-01-28 11:16:01: WARNING: Could not get any data from external
command '/var/mrtg/10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2'
Maybe the external command did not even start. (Illegal seek)

2008-01-28 11:16:01: WARNING: Problem with External get
'/var/mrtg/10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2':
Expected a Number for 'in' but nothing'

2008-01-28 11:16:01: WARNING: Problem with External get
'/var/mrtg/10.10.14.102.cfg -h 10.10.14.102 -1 SIP -2 IAX2':
Expected a Number for 'out' but nothing'

2008-01-28 11:16:01: ERROR: Target[asterisklab2][_IN_] '
$target->[0]{$mode} ' did not eval into defined data
2008-01-28 11:16:01: ERROR: Target[asterisklab2][_OUT_] '
$target->[0]{$mode} ' did not eval into defined data
ntcp-mrtg:/var/www/mrtg#

I can see the script log into the manager interface on the asterisk
server at 10.10.14.102, and there are active SIP channels during
script execution.

Any ideas?


You need to take a step back and first test the script without using
MRTG. Execute it like this:
# /opt/bin/asterisk-mrtg -h localhost -u XXX -p XXXX -1 SIP -2 Zap
10
10
10
10

You should get 4 lines of numbers. That respresents your SIP and Zap
channels. Once you get past this step go back and plug it into your
MRTG config.

Andres
http://www.neuroredes.com

Quote:
Thanks.
JR

Back to top
jmr.richardson at gmai...
Guest





PostPosted: Mon Jan 28, 2008 9:45 pm    Post subject: [asterisk-users] Asterisk and MRTG, a little help please... Reply with quote

Quote:
You need to take a step back and first test the script without using
MRTG. Execute it like this:
# /opt/bin/asterisk-mrtg -h localhost -u XXX -p XXXX -1 SIP -2 Zap
10
10
10
10

You should get 4 lines of numbers. That respresents your SIP and Zap
channels. Once you get past this step go back and plug it into your
MRTG config.

I run the script without using mrtg but I don't get any reply:

mrtg:# /var/mrtg/asterisk-mrtg -h [ipaddress] -u [user] -p [pass] -1 SIP -2 IAX2
mrtg:#

I can see the script log into the manager on the asterisk server, but
doesn't return any figures. i haven't modified anything in the
script. I'm wondering if the script is OK and maybe Asterisk manager
is not setup correctly or asterisk is not returning proper value.
Here is what I have configured in manager.conf:

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[user]
secret = pass
deny=0.0.0.0/0.0.0.0
permit=[subnet of mrtg server]
read = system,call,log,verbose,command,agent,user

Thanks.

JR
--
JR Richardson
Engineering for the Masses
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services