Nagios script request - nagiostats

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

sterpstra
Posts: 45
Joined: Tue May 27, 2008 11:48 pm
Location: So Cal
Contact:

Post by sterpstra »

crazyfrog wrote:Maybe a userrights issue?

Cacti and Nagios running from different users.
Rights to what? It's pulling info from the stat file, correct? These are the same perms as the rest of the Cacti scripts
crony
Posts: 9
Joined: Wed Jul 30, 2008 11:08 am

Post by crony »

When I move the script out of the scripts directory, I receive the same errors in the log. For the hell of it, change the script location to the absolute path.
sterpstra
Posts: 45
Joined: Tue May 27, 2008 11:48 pm
Location: So Cal
Contact:

Post by sterpstra »

crony wrote:When I move the script out of the scripts directory, I receive the same errors in the log. For the hell of it, change the script location to the absolute path.
No go... Same result....
crazyfrog
Posts: 10
Joined: Fri Mar 28, 2008 1:49 am

Post by crazyfrog »

sterpstra wrote:
crazyfrog wrote:Maybe a userrights issue?

Cacti and Nagios running from different users.
Rights to what? It's pulling info from the stat file, correct? These are the same perms as the rest of the Cacti scripts
Right, but the "stats file" located in /usr/local/nagios/bin/nagiostat is owned by the nagios user (e.g. nagios) and the apache/cacti user has no right to access this file.

I could fix it with a chmod 0777 to /usr/local/nagios/bin/nagiostat. Graphs now getting data:
09/27/2008 12:31:12 AM - SYSTEM STATS: Time:71.0459 Method:spine Processes:1 Threads:1 Hosts:29 HostsPerProcess:29 DataSources:351 RRDsProcessed:293
09/27/2008 12:26:12 AM - SYSTEM STATS: Time:71.0200 Method:spine Processes:1 Threads:1 Hosts:29 HostsPerProcess:29 DataSources:351 RRDsProcessed:293
09/27/2008 12:21:12 AM - SYSTEM STATS: Time:71.0852 Method:spine Processes:1 Threads:1 Hosts:29 HostsPerProcess:29 DataSources:351 RRDsProcessed:293
09/27/2008 12:20:02 AM - SPINE: Poller[0] Host[1] DS[750] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/27/2008 12:16:11 AM - SYSTEM STATS: Time:70.1103 Method:spine Processes:1 Threads:1 Hosts:29 HostsPerProcess:29 DataSources:351 RRDsProcessed:293
09/27/2008 12:15:02 AM - SPINE: Poller[0] Host[1] DS[750] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/27/2008 12:11:11 AM - SYSTEM STATS: Time:70.1368 Method:spine Processes:1 Threads:1 Hosts:29 HostsPerProcess:29 DataSources:351 RRDsProcessed:293
09/27/2008 12:10:02 AM - SPINE: Poller[0] Host[1] DS[750] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/27/2008 12:06:13 AM - SYSTEM STATS: Time:71.1740 Method:spine Processes:1 Threads:1 Hosts:29 HostsPerProcess:29 DataSources:351 RRDsProcessed:293
09/27/2008 12:05:02 AM - SPINE: Poller[0] Host[1] DS[750] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/27/2008 12:01:16 AM - SYSTEM STATS: Time:75.1582 Method:spine Processes:1 Threads:1 Hosts:29 HostsPerProcess:29 DataSources:351 RRDsProcessed:293
Hope it helps.

greets
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests