Nagios 2.4 has run out of space ??

Wil Schultz wschultz at bsdboy.com
Wed May 30 17:50:54 CEST 2007


I would suspect that mysql has binary logging turned on, this can  
create many files that are around 1G.

Use: du -sh * starting at / (root) to find where your problem lies,  
if it's mysql they will be in the form of mysql-bin.XXX (or something  
similar)

You obviously will want to backup this data, especially with the  
binary logging turned off, I use the following for cacti alone...  
Adding the nagios directory to this would be easy enough :-)

Happy hunting!

######################################################################## 
##
  #!/bin/bash
  #
  ### Created by WilS to back up Cacti data
  #
  #
  # Define some nice variables
  BACKUPDIR=/export/backup/cacti
  BASE=/data/www
  MYSQLDUMP=/usr/local/mysql/bin/mysqldump
  DATABASE=cacti_database
  DBUSER=cacti_username
  DBPASS=cacti_password

  ### Blank the log file first:
  cat /dev/null > $BASE/cacti/log/cacti.log

  ### Backup the cacti directory
  cd $BASE
  tar zcvf $BACKUPDIR/cacti.`date +%m%d%y`.tgz cacti/

  ### Clean up data over a month old
  find $BACKUPDIR/ -name '*.tgz' -mtime +31 |xargs rm

  ### Dump the database
  $MYSQLDUMP --add-drop-table  $DATABASE -u$DBUSER -p$DBPASS | gzip - 
c > $BACKUPDIR/cacti.`date +%m%d%y`.sql.gz
######################################################################## 
##

-wil

On May 30, 2007, at 8:17 AM, Nedim Bicic wrote:

> How do i delete some of the files i dont wont to delete sensitive  
> informations its using linux
>
> wat can i delete i tryed deleting log files to free some space in  
> cacti where do i find nagios log file i think that has been  
> flodding it
>
> thanks
>
> On 5/30/07, David Gerbec <david.gerbec at agenda.si> wrote:
> Nedim Bicic pravi:
> > Error
> >
> > You have created a new database, but have not yet imported the
> > 'cacti.sql' file. At the command line, execute the following to  
> continue:
> >
> > mysql -u cactiuser -p cacti < cacti.sql
> >
> > This error may also be generated if the cacti database user does not
> > have correct permissions on the cacti database. Please ensure  
> that the
> > cacti database user has the ability to SELECT, INSERT, DELETE,  
> UPDATE,
> > CREATE, ALTER, DROP, INDEX on the cacti database.
> >
> >
> > *Warning*: Unknown(): write failed: No space left on device (28) in
> > *Unknown* on line *0*
>
> By the looks of things, your disk space on the server is full.
>
>
> >
> > *Warning*: Unknown(): Failed to write session data (files). Please
> > verify that the current setting of session.save_path is correct
> > (/var/lib/php/session) in *Unknown* on line *0*
> >
> >
>
>
> Regards,
> David Gerbec
> Agenda Open Systems
> [ www.agenda.si]
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/ 
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when  
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list