• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER SIP softphone

The forum for asterisk and voip discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with QueueStats 0.3.0 DB load

 
Post new topic   Reply to topic     Forum Index -> Asteriskguru tools
View previous topic :: View next topic  
Author Message
nhjeffh



Joined: 25 Jul 2007
Posts: 3

PostPosted: Wed Jul 25, 2007 12:24 am    Post subject: Problem with QueueStats 0.3.0 DB load Reply with quote

Problem A)

When I run http://127.0.0.1/qstats/log/logque.php to populate DB, I get:

Database Fill Up - Queue Statistics Import


The file queue_log.3 (last modified on 31st Dec 1969 19:00:00) was found and considered valid.
Error occured, while trying to read the file

An ls -l of /var/log/asterisk/q* yields:
root@manzetti asterisk# ls -l q*
-rw-rw-r-- 1 asterisk asterisk 342697 Jul 24 20:04 queue_log
-rw-rw-r-- 1 asterisk asterisk 2893258 Jan 9 2007 queue_log.0
-rw-rw-r-- 1 asterisk asterisk 3441434 Mar 30 11:50 queue_log.1
-rw-rw-r-- 1 asterisk asterisk 3363532 May 29 07:44 queue_log.2
-rw-rw-r-- 1 asterisk asterisk 3759602 Jul 20 07:03 queue_log.3
root@manzetti asterisk#

1) Why is the PHP script getting the date wrong, and
2) Why doesn't populate the DB

Problem B)
When I run: http://127.0.0.1/qstats/log/cdr.php
No files like *.csv found in /var/log/asterisk/cdr-csv. Check the content of the specified log directory!

an ls -l of /var/log/asterisk/cdr-csv yields:
root@manzetti asterisk# ls -l /var/log/asterisk/cdr-csv
total 124152
-rw-rw-r-- 1 asterisk asterisk 126997894 Jul 24 20:05 Master.csv
root@manzetti asterisk#


Asterisk Version 1.2.9.1
queue_stats.0.3.0_php4
root@manzetti ~# php -v
PHP 4.3.9 (cgi) (built: May 10 2007 05:19:09)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
root@manzetti ~#
root@manzetti ~# psql --version
psql (PostgreSQL) 7.4.17
contains support for command-line editing

root@manzetti include# cat /var/www/html/qstats/include/config.inc.php
<?php

$os = "linux";
$image_path_lin = "/tmp";
$default_language = "en";
$default_timezone = "-5";
$default_start_hour = "00";
$default_end_hour = "24";
$db_host = "127.0.0.1";
$db_name = "asterisk";
$db_user = "asterisk";
$db_pass = "xxxxxxxx";

$conn_string = "host=$db_host dbname=$db_name user=$db_user password=$db_pass";
$db_connect = pg_connect($conn_string);

?>

root@manzetti log# cat /var/www/html/qstats/log/config.inc.php
<?
// The queue_log and/or cdr file(s) must be here
$queue_log_dir = '/var/log/asterisk';
$cdr_log_dir = '/var/log/asterisk/cdr-csv';

$db_host = "127.0.0.1";
$db_name = "asterisk";
$db_user = "asterisk";
$db_pass = "asterisk";

$conn_string = "host=$db_host dbname=$db_name user=$db_user password=$db_pass";
$db_connect = pg_connect($conn_string);
?>


Any ideas or tips would be appreciated.
Back to top
View user's profile Send private message
nhjeffh



Joined: 25 Jul 2007
Posts: 3

PostPosted: Wed Jul 25, 2007 12:47 am    Post subject: Ignore Part B, I have no accountcodes setup per the document Reply with quote

Ignore Question B I have no accountcodes setup and the Documentation Clearly States that the Master.csv is ignored:

..."2. All outgoing calls are stored in CDR files. The files are placed in /var/log/asterisk/cdr-csv/ by default. The Queue Statistics application does not parse the Master.csv file, because in some cases it might be too large and heavy. That is why you have to create your own *.csv files for the groups you need. You may add ‘accountcode’ value for the accounts you use in sip.conf or iax.conf."
Back to top
View user's profile Send private message
toetshax



Joined: 17 Mar 2008
Posts: 17

PostPosted: Wed Mar 19, 2008 8:43 pm    Post subject: i got almost a similar problem Reply with quote

when i try to run http://server ip address/queuestats/log/logque.php

it gives me this error :


Warning: readdir(): supplied argument is not a valid Directory resource in /var/www/html/queuestats/log/logque.php on line 52

Warning: closedir(): supplied argument is not a valid Directory resource in /var/www/html/queuestats/log/logque.php on line 63

No files like queue_log* found in . Check the content of the specified log directory!

u have any clue????
Back to top
View user's profile Send private message
GSnover



Joined: 11 Jan 2010
Posts: 1
Location: Albuquerque, NM, USA

PostPosted: Mon Jan 11, 2010 9:59 pm    Post subject: Check config.inc.php in the log directory... Reply with quote

<?
// The queue_log and/or cdr file(s) must be here
$queue_log_dir = '/var/log/asterisk/';
$cdr_log_dir = '/var/log/asterisk/cdr-csv/';

This is the setting that works for me.

Greg
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Asteriskguru tools All times are GMT
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
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™