Чистим историю в базе данных zabbix

Ни для кого не секрет , что со временем база данных zabbix увеличивается. Поэтому покажу вам как ее почистить в базе. Итак, подключаемся любым удобным клиентом к базе mysql и далее по списку.

  1. Останавливаем сервис zabbix
    /etc/init.d/zabbix_server stop
  2. Создаем новые таблицы по аналогии с оригинальными
    CREATE TABLE history_uint_new LIKE history_uint
    CREATE TABLE history_new LIKE history
  3. Переносим в нее данные за последние N-дней. В моем случае 30 дней.
    INSERT IGNORE INTO history_uint_new SELECT * FROM history_uint WHERE clock > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 day))
    INSERT IGNORE INTO history_new SELECT * FROM history WHERE clock > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 day))
    

    У меня при переносе mysql выдал ошибку ERROR 1206 (HY000): The total number of locks exceeds the lock table size. Чтобы это исправить я добавил параметр в конфиге /etc/my.cnf: innodb_buffer_pool_size = 100M. После чего нужено рестартануть сервис.

  4. Переименовываем таблицы и удаляем старые таблицы
    ALTER TABLE history_uint RENAME history_uint_old
    ALTER TABLE history_uint_new RENAME history_uint
    DROP TABLE history_uint_old
    ALTER TABLE history RENAME history_old 
    ALTER TABLE history_new RENAME history
    DROP TABLE history_old
  5. Запускаем сервис
    /etc/init.d/zabbix_server start

Note: если у вас разрослась база, то можно воспользоваться руководством

193 комментария к “Чистим историю в базе данных zabbix

  1. The next time I read a blog, I hope that it won’t fail me just as much as this particular one. I mean, I know it was my choice to read, nonetheless I genuinely thought you would have something interesting to say. All I hear is a bunch of crying about something you can fix if you weren’t too busy looking for attention.

  2. Hmm it looks like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to everything. Do you have any recommendations for first-time blog writers? I’d definitely appreciate it.

  3. Great article. I discover something extra challenging on various blogs day-to-day. It will certainly always be promoting to review content from other writers and practice a something from their shop. I?d favor to utilize some with the content on my blog whether you don?t mind. Natually I?ll offer you a web link on your web blog. Many thanks for sharing.

  4. Have you ever considered publishing an e-book or guest authoring on other websites?
    I have a blog centered on the same ideas you discuss and would really like to
    have you share some stories/information. I know my subscribers would
    value your work. If you are even remotely interested,
    feel free to shoot me an email.

  5. Nice post. I learn something new and challenging on websites I stumbleupon on a daily basis. It’s always exciting to read articles from other authors and use a little something from other sites.

  6. I have to thank you for the efforts you have put in penning this site. I really hope to see the same high-grade blog posts from you later on as well. In truth, your creative writing abilities has inspired me to get my very own site now 😉

  7. naturally like your website but you need to check the spelling on several of your posts.

    Many of them are rife with spelling issues and I in finding it
    very troublesome to tell the reality nevertheless I’ll surely come again again.

  8. The next time I check out a blog, I hope that it doesn’t disappoint me as high as this. I indicate, I understand it was my selection to read, yet I in fact thought youd have something interesting to claim. All I hear is a number of whimpering concerning something that you could fix if you werent as well hectic seeking focus.

  9. I discovered your blog site on google and also check a few of your very early posts. Continue to keep up the very good run. I just additional up your RSS feed to my MSN News Visitor. Looking for forward to learning more from you later!?

  10. Youre so cool! I don’t suppose Ive read anything such as this before. So good to find somebody with some original ideas on this subject. realy thanks for starting this up. this site is something that is required on the web, somebody with a little originality. beneficial job for bringing something new to the web!

  11. Youre so great! I do not suppose Ive check out anything like this prior to. So wonderful to find someone with some original ideas on this subject. realy thanks for starting this up. this internet site is something that is required online, somebody with a little originality. useful work for bringing something new to the internet!

  12. Appreciating the commitment you put into your website and in depth information you present. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Wonderful read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

  13. Hey there! This is kind of off topic but I need some advice from an established blog. Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about setting up my own but I’m not sure where to begin. Do you have any tips or suggestions? Cheers

  14. Howdy! I know this is somewhat off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having difficulty finding one? Thanks a lot!

  15. Hey are using WordPress for your site platform? I’m new to the blog world but I’m trying to get started and set up my own. Do you require any html coding expertise to make your own blog? Any help would be really appreciated!

  16. Hey there I am so thrilled I found your weblog, I really found you by accident, while I was searching on Google for something else, Nonetheless I am here now and would just like to say kudos for a tremendous post and a all round enjoyable blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have bookmarked it and also included your RSS feeds, so when I have time I will be back to read much more, Please do keep up the awesome work.

  17. Hello there! This post couldn’t be written any better! Reading this post reminds me of my good old room mate! He always kept talking about this. I will forward this page to him. Pretty sure he will have a good read. Many thanks for sharing!

  18. This design is wicked! You definitely know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool!

  19. I seriously love your site.. Pleasant colors & theme. Did you build this amazing site yourself? Please reply back as I’m hoping to create my very own site and would love to know where you got this from or what the theme is named. Kudos!

  20. Today, while I was at work, my sister stole my iphone and tested to see if it can survive a 40 foot drop, just so she can be a youtube sensation. My iPad is now broken and she has 83 views. I know this is completely off topic but I had to share it with someone!

  21. Pretty nice post. I just stumbled upon your weblog and wished to say that I’ve truly enjoyed surfing around your blog posts. After all I?ll be subscribing to your rss feed and I hope you write again soon!

  22. After study a few of the blog posts on your website currently, and I genuinely like your method of blogging. I bookmarked it to my bookmark web site list as well as will be examining back soon. Pls have a look at my website as well and let me recognize what you think.

  23. Hi there this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I wanted to get guidance from someone with experience. Any help would be greatly appreciated!

  24. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get three emails with the same comment. Is there any way you can remove people from that service? Appreciate it!

  25. Hey, I think your blog might be having browser compatibility issues. When I look at your blog site in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, excellent blog!

  26. After study a few of the post on your website currently, as well as I really like your way of blog writing. I bookmarked it to my book marking web site list and will be inspecting back quickly. Pls check out my website too and also let me understand what you think.

  27. Hey fantastic website! Does running a blog such as this take a large amount of work? I’ve virtually no expertise in computer programming however I had been hoping to start my own blog soon. Anyway, should you have any ideas or tips for new blog owners please share. I understand this is off subject but I simply wanted to ask. Cheers!

  28. Greetings from Colorado! I’m bored to death at work so I decided to check out your blog on my iphone during lunch break. I really like the knowledge you present here and can’t wait to take a look when I get home. I’m amazed at how quick your blog loaded on my phone .. I’m not even using WIFI, just 3G .. Anyways, good site!

  29. Hey great website! Does running a blog similar to this require a great deal of work? I have virtually no expertise in computer programming but I had been hoping to start my own blog in the near future. Anyhow, if you have any recommendations or tips for new blog owners please share. I understand this is off subject however I just wanted to ask. Appreciate it!

  30. Howdy this is kind of of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I wanted to get advice from someone with experience. Any help would be enormously appreciated!

  31. Howdy! I realize this is kind of off-topic but I needed to ask. Does operating a well-established website like yours require a massive amount work? I’m completely new to running a blog however I do write in my journal everyday. I’d like to start a blog so I can share my own experience and thoughts online. Please let me know if you have any ideas or tips for new aspiring bloggers. Appreciate it!

  32. Please let me know if you’re looking for a article writer for your weblog. You have some really good articles and I believe I would be a good asset. If you ever want to take some of the load off, I’d really like to write some content for your blog in exchange for a link back to mine. Please shoot me an email if interested. Thanks!

  33. Hello! I know this is kinda off topic but I was wondering if you knew where I could locate a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having trouble finding one? Thanks a lot!

  34. I am curious to find out what blog platform you are working with? I’m experiencing some minor security issues with my latest blog and I would like to find something more safe. Do you have any recommendations?

  35. Hi! I know this is kinda off topic however I’d figured I’d ask. Would you be interested in trading links or maybe guest writing a blog post or vice-versa? My website covers a lot of the same topics as yours and I believe we could greatly benefit from each other. If you’re interested feel free to shoot me an email. I look forward to hearing from you! Fantastic blog by the way!

  36. Do you have a spam issue on this blog; I also am a blogger, and I was wondering your situation; many of us have developed some nice procedures and we are looking to trade strategies with other folks, be sure to shoot me an email if interested.

  37. Hi! This is kind of off topic but I need some guidance from an established blog. Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about setting up my own but I’m not sure where to start. Do you have any tips or suggestions? Thanks

  38. I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz reply as I’m looking to design my own blog and would like to find out where u got this from. many thanks

  39. Have you ever thought about including a little bit more than just your articles? I mean, what you say is valuable and everything. Nevertheless think of if you added some great photos or videos to give your posts more, “pop”! Your content is excellent but with pics and video clips, this site could certainly be one of the very best in its field. Amazing blog!

  40. I know this if off topic but I’m looking into starting my own weblog and was curious what all is needed to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet smart so I’m not 100 positive. Any tips or advice would be greatly appreciated. Thanks

  41. Admiring the dedication you put into your blog and in depth information you offer. It’s awesome to come across a blog every once in a while that isn’t the same unwanted rehashed material. Fantastic read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

  42. Greetings from Carolina! I’m bored at work so I decided to browse your website on my iphone during lunch break. I enjoy the information you present here and can’t wait to take a look when I get home. I’m shocked at how fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G .. Anyways, excellent blog!

  43. Hey, I think your blog might be having browser compatibility issues. When I look at your blog in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, great blog!

  44. Hey would you mind letting me know which hosting company you’re utilizing? I’ve loaded your blog in 3 completely different internet browsers and I must say this blog loads a lot quicker then most. Can you recommend a good hosting provider at a reasonable price? Cheers, I appreciate it!

  45. There are some intriguing times in this short article but I don?t know if I see all of them facility to heart. There is some legitimacy yet I will take hold opinion up until I check into it better. Good write-up, thanks and also we desire extra! Contributed to FeedBurner as well

  46. I simply want to tell you that I’m very new to blogging and seriously savored you’re web blog. Almost certainly I’m likely to bookmark your website . You surely have excellent article content. Kudos for sharing your blog site.

  47. Have you ever considered about including a little bit more than just your articles? I mean, what you say is fundamental and everything. However just imagine if you added some great images or videos to give your posts more, “pop”! Your content is excellent but with images and video clips, this website could certainly be one of the most beneficial in its field. Great blog!

  48. I know this if off topic but I’m looking into starting my own weblog and was curious what all is needed to get setup? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet savvy so I’m not 100 sure. Any suggestions or advice would be greatly appreciated. Thank you

  49. Hi there! Someone in my Myspace group shared this site with us so I came to take a look. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Wonderful blog and outstanding design.

  50. Appreciate you for sharing these wonderful posts. In addition, the perfect travel as well as medical insurance plan can often eradicate those worries that come with traveling abroad. Some sort of medical crisis can shortly become extremely expensive and that’s certain to quickly put a financial stress on the family’s finances. Setting up in place the excellent travel insurance bundle prior to leaving is worth the time and effort. Cheers

  51. Hey would you mind sharing which blog platform you’re working with? I’m going to start my own blog in the near future but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique. P.S Apologies for being off-topic but I had to ask!

  52. Great post. I used to be checking constantly this weblog and I am inspired! Very helpful information particularly the ultimate section 🙂 I deal with such info a lot. I was seeking this particular information for a long time. Thank you and good luck.

  53. Hiya, I’m really glad I’ve found this information. Nowadays bloggers publish only about gossips and net and this is really annoying. A good site with exciting content, that is what I need. Thank you for keeping this site, I’ll be visiting it. Do you do newsletters? Can not find it.

  54. I loved as much as you will receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an shakiness over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you shield this hike.

  55. Hi, There’s no doubt that your website could be having browser compatibility problems. Whenever I look at your blog in Safari, it looks fine however, when opening in Internet Explorer, it has some overlapping issues. I merely wanted to give you a quick heads up! Aside from that, great site.

  56. I simply want to tell you that I am beginner to weblog and actually liked this page. Likely I’m planning to bookmark your blog . You absolutely have tremendous article content. With thanks for sharing your webpage.

  57. Howdy very cool site!! Guy .. Beautiful .. Superb .. I’ll bookmark your website and take the feeds additionally…I’m happy to find numerous helpful information right here in the submit, we’d like work out extra techniques on this regard, thank you for sharing.

  58. An impressive share, I just now with all this onto a colleague who was conducting a small analysis within this. And hubby in truth bought me breakfast simply because I uncovered it for him.. smile. So let me reword that: Thnx with the treat! But yeah Thnkx for spending plenty of time to debate this, I’m strongly regarding this and really like reading on this topic. If possible, as you become expertise, do you mind updating your site with a lot more details? It is highly of great help for me. Big thumb up just for this text!

  59. Oh my goodness! Incredible article dude! Thank you, However I am having troubles with your RSS. I don’t understand why I am unable to join it. Is there anybody else having similar RSS problems? Anybody who knows the solution will you kindly respond? Thanx.

  60. I found your blog site on google and examine a couple of of your early posts. Proceed to maintain up the very good operate. I just extra up your RSS feed to my MSN News Reader. Looking for forward to reading extra from you afterward!? I am often to running a blog and i really appreciate your content. The article has actually peaks my interest. I’m going to bookmark your website and preserve checking for brand new information.

  61. Thanks for sharing your ideas. I’d personally also like to express that video games have been actually evolving. Technology advances and innovative developments have made it easier to create genuine and active games. These kinds of entertainment video games were not really sensible when the actual concept was first of all being tried. Just like other areas of technologies, video games also have had to advance as a result of many ages. This itself is testimony towards the fast growth of video games.

  62. Right here is the right blog for everyone who wishes to understand this topic. You know a whole lot its almost tough to argue with you (not that I personally will need to…HaHa). You definitely put a fresh spin on a topic that’s been written about for many years. Great stuff, just wonderful.

  63. Hello there I am so delighted I found your blog, I really found you by error, while I was searching on Aol for something else, Anyhow I am here now and would just like to say thank you for a fantastic post and a all round thrilling blog (I also love the theme/design), I don’t have time to read it all at the minute but I have bookmarked it and also added in your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the great work.

  64. Furthermore, i believe that mesothelioma is a unusual form of cancer that is often found in these previously subjected to asbestos. Cancerous tissue form in the mesothelium, which is a protective lining which covers many of the body’s body organs. These cells generally form inside the lining of your lungs, abdomen, or the sac that encircles one’s heart. Thanks for sharing your ideas.

  65. A motivating discussion is worth comment. I think that you should publish more about this issue, it might not be a taboo matter but usually folks don’t speak about such issues. To the next! Many thanks!!

  66. I am really enjoying the theme/design of your web site. Do you ever run into any browser compatibility problems? A number of my blog visitors have complained about my site not operating correctly in Explorer but looks great in Firefox. Do you have any advice to help fix this issue?

  67. I was curious if you ever considered changing the structure of your website? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 images. Maybe you could space it out better?

  68. May I simply say what a comfort to find someone that really understands what they’re discussing online. You actually realize how to bring a problem to light and make it important. More people have to check this out and understand this side of your story. I can’t believe you are not more popular given that you certainly possess the gift.

  69. Howdy! This post couldn’t be written any better! Reading this post reminds me of my previous room mate! He always kept chatting about this. I will forward this write-up to him. Pretty sure he will have a good read. Thanks for sharing!

  70. There are a handful of fascinating points with time in this article but I don’t know if these people center to heart. There’s some validity but I’ll take hold opinion until I investigate it further. Very good write-up , thanks and now we want much more! Included in FeedBurner also

  71. May I simply just say what a relief to discover somebody that truly understands what they’re discussing on the web. You certainly understand how to bring a problem to light and make it important. More people need to check this out and understand this side of the story. I was surprised you aren’t more popular because you most certainly possess the gift.

  72. Aw, this was a really nice post. Finding the time and actual effort to make a great article… but what can I say… I procrastinate a whole lot and don’t seem to get nearly anything done.

  73. Hi! This is kind of off topic but I need some advice from an established blog. Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to start. Do you have any points or suggestions? With thanks

  74. There are several posts available near this, I do think taking there reference could experience made this spot or article really informative. That’s not me expression this post is poor quality. Simply Need to pronounce the fact that info provided here was unique, merely rebuild more very near to complete, supporting to former information get been actually good. The points you get touched here’s important, thus I’m going to spot several of the information here to produce this actually beneficial to entirely the newbie’s here. Many thanks for this data. Actually helpful!

  75. Nice post. I learn something more challenging on distinct blogs everyday. It will always be stimulating to read content off their writers and practice a little something from their store. I’d choose to use some with all the content in my small weblog whether you do not mind. Natually I’ll provide a link on your own internet weblog. Many thanks sharing.

  76. Hey there! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche. Your blog provided us beneficial information to work on. You have done a marvellous job!

  77. Woah! I’m really enjoying the template/theme of this blog. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between user friendliness and visual appeal. I must say that you’ve done a fantastic job with this. Additionally, the blog loads extremely quick for me on Internet explorer. Superb Blog!

  78. I’m impressed, I have to admit. Rarely do I encounter a blog that’s both equally educative and engaging, and without a doubt, you have hit the nail on the head. The problem is an issue that too few people are speaking intelligently about. Now i’m very happy I found this during my hunt for something concerning this.

  79. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something informative to read?

  80. Hello, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam responses? If so how do you protect against it, any plugin or anything you can recommend? I get so much lately it’s driving me mad so any support is very much appreciated.

  81. Great – I should certainly pronounce, impressed with your site. I had no trouble navigating through all tabs as well as related information ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your customer to communicate. Nice task..

  82. Helpful blog post and thanks for sharing. Some things in here I haven’t thought about before, I would like to use this moment to say that I really like this blog. It has been a great resource of knowledge for me. Thank you so much!

  83. Do you have a spam issue on this website; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice procedures and we are looking to trade strategies with others, why not shoot me an e-mail if interested.

  84. Thanks for revealing your ideas. I would also like to say that video games have been ever before evolving. Today’s technology and inventions have assisted create realistic and active games. These kind of entertainment video games were not as sensible when the actual concept was first being experimented with. Just like other forms of electronics, video games also have had to evolve by means of many decades. This is testimony towards the fast growth and development of video games.

  85. Having read this I believed it was really informative. I appreciate you taking the time and energy to put this information together. I once again find myself personally spending a significant amount of time both reading and leaving comments. But so what, it was still worth it!

  86. Have you ever considered writing an e-book or guest authoring on other blogs? I have a blog based on the same information you discuss and would really like to have you share some stories/information. I know my subscribers would appreciate your work. If you are even remotely interested, feel free to send me an email.

  87. of course like your web-site however you need to test the spelling on several of your posts. Many of them are rife with spelling problems and I find it very bothersome to tell the reality nevertheless I’ll surely come again again.

  88. Hey there! This is my 1st comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading through your articles. Can you recommend any other blogs/websites/forums that go over the same subjects? Thank you so much!

  89. hello there and thank you in your information – I have certainly picked up anything new from proper here. I did alternatively expertise several technical issues the usage of this site, as I skilled to reload the web site lots of occasions prior to I may just get it to load correctly. I have been puzzling over in case your web host is OK? Not that I am complaining, however sluggish loading cases occasions will often impact your placement in google and could harm your high-quality ranking if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Well I’m adding this RSS to my e-mail and could glance out for a lot more of your respective intriguing content. Make sure you replace this again soon..

  90. Greetings from Los angeles! I’m bored to tears at work so I decided to check out your site on my iphone during lunch break. I really like the info you provide here and can’t wait to take a look when I get home. I’m amazed at how quick your blog loaded on my mobile .. I’m not even using WIFI, just 3G .. Anyhow, superb blog!

Оставить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *