Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Jul 19, 2019 9:27 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 140 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10
Author Message
 Post subject: Re: Quick and dirty script to add devices to cacti
PostPosted: Tue Jan 15, 2013 9:32 am 
Offline

Joined: Tue Jan 15, 2013 9:20 am
Posts: 1
Hello,

I have problems with my old server, more specifically in the mysql database and had to redo the server.

In create a new server, I'm having trouble inserting devices with host-script add-script.php on Cacti version 0.8.8a.

Besides the problem of variable "mb_strtolower" which converted to" strtolower" he presents data errors and the API api_device.php that contains one more item, the variable "device_threads"

Can anyone help me?

Old server: Debian
New server: CentOS

php hosts-add-script.php --cacti=/var/www/cacti --separator=';' --f=hosts-files-to-add.txt
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 165
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 165
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 166
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 166
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 167
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 167
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 168
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 168
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 169
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 169
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 170
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 170
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 171
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_constants.php on line 171
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 670
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 670
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 671
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 671
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 672
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 672
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 673
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 673
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 674
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 674
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 675
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 675
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 676
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRST/-2.0/DST' instead in /var/www/cacti/include/global_arrays.php on line 676


Top
 Profile  
 
 Post subject: Re: Quick and dirty script to add devices to cacti
PostPosted: Tue Jan 15, 2013 3:26 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
You should do what the error messages tells you to do. This was introduced by newer versions of PHP: it REQUIRES the timezone to be set
R.

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


Top
 Profile  
 
 Post subject: Re: Quick and dirty script to add devices to cacti
PostPosted: Sat Jan 19, 2013 2:39 am 
Offline

Joined: Sat Jan 19, 2013 2:22 am
Posts: 8
this is a very important addon. perhapse you can post the script so we can test.
Image
Image
Image
Image
Image


Top
 Profile  
 
 Post subject: Re: Quick and dirty script to add devices to cacti
PostPosted: Thu Jun 13, 2013 2:50 pm 
Offline

Joined: Thu Jun 13, 2013 2:03 pm
Posts: 1
Hello cacti Guru's,

I want to add 200+ IP addresses as including name of the host. Such as;

Description: xyz Server
Hostname: 192.168.1.1
Host Template: Cisco
Thold Up/Down Email Notification: Global List
Downed Device Detection: Ping
Ping Method: ICMP Ping

adding manually like this takes to much time. Give advise how to handle this issue with script, please !

P.s: my cacti "version 0.8.8a"

http://www.cacti.net/downloads/docs/html/cli_add_device.html

I want to add "description" and "hostname" from csv file !


Top
 Profile  
 
 Post subject: Re: Quick and dirty script to add devices to cacti
PostPosted: Thu Feb 06, 2014 7:51 am 
Offline

Joined: Thu Feb 06, 2014 7:39 am
Posts: 1
hi, newbie,
i'd like to know how to use the script above with csv file where i'll put the information of all device i want to discover and graph
thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 140 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 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:  
cron

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