Ad Widget

Collapse

Question About Media Types

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Buto
    Junior Member
    • Nov 2021
    • 1

    #1

    Question About Media Types

    Good morning guys,

    A small heads-up. I'm fairly new to Zabbix and I'm trying to get the hang of it. I've created a Media Type [Webhook] in where I am currently running a script I've found on the Zabbix website; https://www.zabbix.com/integrations/msteams in combination with a fix suggested here; https://www.zabbix.com/forum/zabbix-...-teams-webhook. I am receiving error notifications, however these are rather ... Bland. Reason being is that within the Media Type I've not yet created a 'Message Template'.

    I am trying to do so but whenever I try to add a Message Template to my Media Type the page refreshes and bring me to 'Create a New Media Type' environment. This is rather strange. I've created a video to what I am experiencing so you can see if I am doing anything wrong: https://screencast-o-matic.com/watch/crX0QIVIamw and if anyone might know what the steps are to resolve this. Because I'd like it if my error notifications actually have content.

    The Zabbix version I am using is; Zabbix 5.0.6. © 2001–2020.

    Thanks in advance!

    Kind regards,

    Buto
    Last edited by Buto; 23-11-2021, 19:35.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Whenever you encounter something that seems like it might be a bug in Zabbix, my first recommendation is always check to see if you're running the latest version in your series. I'm not saying you should update to version 5.4.5, since many, many things changed at 5.2 and 5.4, but staying in the 5.0 LTS series the latest version is 5.0.17. You might want to consider updating to that version.

    Alternately, you can review the release notes for each version in the 5.0 series, to see if anything mentioned as "fixed" seems like it might relate to the issue you're experiencing.





    etc.

    Comment


    • Buto
      Buto commented
      Editing a comment
      Good morning Tim Mooney,

      Thank you for your reply. I've tried to perform the upgrade on the Ubuntu server, however quickly ran into an issue. The following article I have followed to perform the minor upgrade as mentioned at the bottom of the webpage: https://www.zabbix.com/documentation.../debian_ubuntu

      The issue I ran into was that there was no diskspace available on the server itself. Funny, we have a monitoring tool that reports that machines run out of diskspace or if they are unresponsive. Yet it's not been configured as such that once the diskspace runs out on the Zabbix server itself it gives of an error notification. I've asked my colleague who's the Linux expert within my organization - I am not that well versed with Linux and still learning - to take a look at it. It seems the MySQL database has consumed all diskspace. I can see so, however I am not confident I can resolve the issue without breaking anything.

      I believe I have found the root cause as to why the above behavior is showing thanks to your comment. Much appreciated!

      Kind regards,
      Buto
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #3
    I'm glad my suggestion helped, even if the problem wasn't what either of us were thinking.

    The first step to getting things fixed up is to get enough free space in the volume where the active database files live so that the database can function. Assuming your data directory is under /var/lib/mysql and that is part of the /var filesystem, you can sometimes temporarily recover some space by cleaning up any cached package metadata that's stored under /var/cache. For an RPM-based system that would "yum clean all", for Ubuntu there's some similar "apt" command for cleaning the cache. That's an easy way to free a small amount of space without harm, though it's temporary because the metadata will just get re-cached.

    Deleting old log files that you don't need from directories under /var/log will also sometimes allow you to quickly reclaim some space. Just make certain it isn't something you need.

    If the /var volume was created on top of a Linux logical volume (LVM) and there is free space in that volume group, you may also be able to extend (grow) the logical volume (with lvextend) and then grow the filesystem on top (resize2fs if it's ext3 or ext4, other filesystem types like XFS use a different command).

    Once the database has some breathing room, you'll want to identify what's using up all the space and whether that's normal based on the parameters you've set or whether there's a problem. Typically it's caused by people keeping "history" for too long. Check the Zabbix docs on history vs. trends, and ask in a new thread if you have questions after reading those.

    If you lower your retention period for history for many of your items (and probably then increase the trends time for the items), the Zabbix housekeeper will start deleting items from the "history" tables, but it will take a while for it to catch up. You can force it to run manually on a more frequent basis, but there's a maximum amount it will remove at any one time, so depending upon how far behind it is with cleanup once you've lowered history retention, it could take a long time for it to clean out the old data.

    Remember too that with database files, when values are deleted within a database, the database file doesn't typically shrink. Instead, it has unallocated space within it that it can reuse. To shrink a file like the "history" or "history_uint" table, you will need to read up on MySQL table operations, like "OPTIMIZE".

    Good luck!

    Comment

    Working...