Huge files in /var.
-
prateekagr1988
- Posts: 62
- Joined: Fri Sep 26, 2014 7:21 pm
Huge files in /var.
2903.2MB 2014-12-15 mysql /var/lib/mysql/nagios/nagios_commenthistory.MYD
2896.2MB 2014-12-15 mysql /var/lib/mysql/nagios/nagios_commenthistory.TMD
548.3MB 2014-12-15 mysql /var/lib/mysql/nagios/nagios_statehistory.MYD
468.0MB 2014-12-08 nagios /var/spool/mail/nagios
344.1MB 2014-12-15 mysql /var/lib/mysql/nagios/nagios_commenthistory.MYI
Please suggest on how to housekeep those, and re-direct to a different file system from /var.
2896.2MB 2014-12-15 mysql /var/lib/mysql/nagios/nagios_commenthistory.TMD
548.3MB 2014-12-15 mysql /var/lib/mysql/nagios/nagios_statehistory.MYD
468.0MB 2014-12-08 nagios /var/spool/mail/nagios
344.1MB 2014-12-15 mysql /var/lib/mysql/nagios/nagios_commenthistory.MYI
Please suggest on how to housekeep those, and re-direct to a different file system from /var.
Re: Huge files in /var.
Files located in the directory: /var/lib/mysql/nagios are tables. You could truncate those tables, or decrease their retention window through Admin --> Performance --> Databases.
Well, you would need to move the default location for the database files. Have you considered creating a new mount for /var? Nagios XI systems will make heavy use of /usr and /var.prateekagr1988 wrote:Please suggest on how to housekeep those, and re-direct to a different file system from /var.
Empty the mail file . . .prateekagr1988 wrote:468.0MB 2014-12-08 nagios /var/spool/mail/nagios
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
prateekagr1988
- Posts: 62
- Joined: Fri Sep 26, 2014 7:21 pm
Re: Huge files in /var.
Thanks for the inputs !
Could you suggest what all can be moved from /usr and /var to different file systems ?
We have been asked to move all the application specific data to different mounts (and not use / or /var or /usr).
Could you suggest what all can be moved from /usr and /var to different file systems ?
We have been asked to move all the application specific data to different mounts (and not use / or /var or /usr).
Re: Huge files in /var.
This is possible with symlinks.
Data in /usr/local:
Data in /var:
Data in /usr/local:
Code: Select all
/nagios
/nagiosxi
/nagiosmobile
/nagvis
/nrdpCode: Select all
/lib/mrtg
/lib/mysql
/lib/pgsql
Various logs in /var/log.Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
prateekagr1988
- Posts: 62
- Joined: Fri Sep 26, 2014 7:21 pm
Re: Huge files in /var.
Yes.. that's a good suggestion
So I should stop Nagios, and create the entire file structure in a different location ? or how does it work ?
So I should stop Nagios, and create the entire file structure in a different location ? or how does it work ?
Re: Huge files in /var.
Symbolic Links:
http://en.wikipedia.org/wiki/Symbolic_link
http://www.cyberciti.biz/tips/understan ... links.html
Usually you create the folders somewhere else in your filesystem (on a different mount usually). Stop all relevant services, and then move/copy all the data from each folder to the new respective folder in the mount directory. You then create a symbolic links to the new directories and restart services.
Just an FYI: Doing this is technically unsupported though we will do what we can to help. Just beware that if you are new to linux, you may want to do some reading before going about creating mounts, moving XI files, and setting up symlinks.
http://en.wikipedia.org/wiki/Symbolic_link
http://www.cyberciti.biz/tips/understan ... links.html
This is something your linux admins should be able to help you with. It can be different in different environments.prateekagr1988 wrote:So I should stop Nagios, and create the entire file structure in a different location ? or how does it work ?
Usually you create the folders somewhere else in your filesystem (on a different mount usually). Stop all relevant services, and then move/copy all the data from each folder to the new respective folder in the mount directory. You then create a symbolic links to the new directories and restart services.
Just an FYI: Doing this is technically unsupported though we will do what we can to help. Just beware that if you are new to linux, you may want to do some reading before going about creating mounts, moving XI files, and setting up symlinks.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
prateekagr1988
- Posts: 62
- Joined: Fri Sep 26, 2014 7:21 pm
Re: Huge files in /var.
Creating of new FS is managed by our unix admins here, and I am fairly aware of unix.. so should not be an issue.. I would like to understand, what all should be stopped ideally.. when I move those files in /usr and /var (including the backups generated in /store)..
Re: Huge files in /var.
Gotchya, my apologies.prateekagr1988 wrote:and I am fairly aware of unix
prateekagr1988 wrote:what all should be stopped ideally
Code: Select all
nagios
ndo2db
mysqld
postgresql
npcd
httpd
crond
xinetdFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
prateekagr1988
- Posts: 62
- Joined: Fri Sep 26, 2014 7:21 pm
Re: Huge files in /var.
No worries.
Do we have any reference document which gives a fair idea of such kind of tweaks and suggestions to improve the performance of Nagios ?
Do we have any reference document which gives a fair idea of such kind of tweaks and suggestions to improve the performance of Nagios ?
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Huge files in /var.
Here's one good example document we have. Other things you can look into are ramdisks, rrdcached, offloading mysql and ndo2db, possibly addition of mod_gearman for distributing checks. Take your time and assess what you really need to implement before jumping on all of these though.
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.