Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


script problem

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
rrosnowski



Joined: 22 Sep 2004
Posts: 15

PostPosted: Wed Oct 20, 2004 10:00 am    Post subject: script problem Reply with quote

Hey Cacti Rocks... i am trying to get weatherbug working as an excercise for getting custome scripts to work. I am having a problem getting it to work. Initially i could run the program no problem from the command, but when i ran cmd.php, i got some errors.

Code:
#!/usr/bin/php -q
10/20/2004 10:16:46 AM - CMDPHP: Poller[0] PHP Script Server Started Properly
: bad interpreter: No such file or directoryweatherbug.pl: /usr/bin/perl
10/20/2004 10:16:46 AM - CMDPHP: Poller[0] Host[0] WARNING: Result from CMD not valid.  Partial Result:
10/20/2004 10:16:46 AM - CMDPHP: Poller[0] Host[0] CMD: /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl, output: U


i edited weatherbug.pl and added -w at the top and got it to worked kinda!

Code:

#!/usr/bin/php -q
10/20/2004 11:00:08 AM - CMDPHP: Poller[0] PHP Script Server Started Properly
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte) in substitution (s///) at /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl line 5.
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte) in substitution (s///) at /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl line 5.
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte) in substitution (s///) at /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl line 5.
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte) in substitution (s///) at /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl line 5.
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte) in substitution (s///) at /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl line 5.
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte) in substitution (s///) at /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl line 5.
10/20/2004 11:00:09 AM - CMDPHP: Poller[0] Host[0] CMD: /usr/local/apache2/htdocs/cacti/scripts/weatherbug.pl, output: current_temp:46 wind_speed:4 barometer:3010 humidity:100 high_temp:46 low_temp:45 dew_point_temp:46 wind_chill_temp:44
10/20/2004 11:00:10 AM - CMDPHP: Poller[0] Host[7] SNMP: Host responded to SNMP
10/20/2004 11:00:10 AM - CMDPHP: Poller[0] Host[7] RECACHE: Processing 1 items in the auto



Anyone know what is going wrong?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group