Monitor Docker Containers Resources using Wazuh


Use case:

Monitor CPU and memory usage of docker containers using Wazuh.

Wazuh Configuration:

Within the Wazuh UI, Navigate to Management -> Groups then edit the group configuration to add:

<localfile>
  <command>docker stats --format "{{.Container}} {{.Name}} {{.CPUPerc}} {{.MemUsage}}" --no-stream</command>
  <frequency>60</frequency>
  <log_format>command</log_format>
  <out_format>$(timestamp) $(hostname) docker: $(log)</out_format>
 </localfile>

The above command will be executed every minute to send an update about the resources to the Wazuh manager.

Then add the decoders and rules to parse and convey the needed information.

Decoders:

<decoder name="dockerR">
    <program_name>docker</program_name>
</decoder>

<decoder name="docker-resouces">
  <parent>dockerR</parent>
  <prematch>ossec: output: 'docker stats --format "{{.Container}} {{.Name}} {{.CPUPerc}} {{.MemUsage}}" --no-stream':</prematch>
  <regex offset="after_prematch"> (\S+) (\S+) (\S+) (\S+) / (\S+)</regex>
  <order>ContainerID, ContainerName, ContainerCPU, ContainerMemoryUsage, ContainerMemroyAvailable </order>
</decoder>

Rule:

<group name="docker">
<rule id="100005" level="5">
    <decoded_as>dockerR</decoded_as>
    <description>alert docker ressources</description> 
  </rule>
</group>

Result:

DEMO:

I hope you find it useful 🙂

,

46 responses to “Monitor Docker Containers Resources using Wazuh”

  1. An interesting discussion is price comment. I think that you must write more on this topic, it may not be a taboo topic but usually individuals are not enough to talk on such topics. To the next. Cheers

  2. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  3. whoah this blog is magnificent i really like reading your posts. Keep up the good paintings! You already know, a lot of persons are searching round for this info, you could aid them greatly.

  4. Wonderful work! This is the type of info that should be shared across the internet. Shame on the seek engines for not positioning this put up upper! Come on over and discuss with my website . Thank you =)

  5. A believer in health’s transformative power, he empowers clients with passionate training and personalised supplement choices, and ignites results for readers by unifying his professional recommendation with a do-or-die mantra.

    Its balanced blend of creatine, caffeine, and other key ingredients consistently delivered the outcomes we sought.
    After an in depth analysis of various pre-workouts, our staff unanimously agrees that Gorilla Mode stands out as
    the best.
    A standout ingredient is coconut water powder, uncommon in pre-workouts,
    aiding quick rehydration and electrolyte replenishment during intense exercises, emphasizing the necessity for hydration. Testers’ experiences with the Power Matrix various; some reported improved muscle pumps,
    whereas others did not notice a lot change in performance.
    Nevertheless, they unanimously found Mr. Hyde Signature
    to be one of the tastier pre-workout options out there.

    They can be significantly beneficial for individuals engaged in resistance
    coaching or endurance sports activities. Additional,
    the sort of training is going to play a large factor in if and when to take BCAAs.

    If you are going and performing a primary 45-minute workout class, BCAAs again turn out to be less of
    an element.
    Leoni is passionate about all things health and holds qualifications as
    an ACE CPT, Level 3 mat Pilates teacher and nutrition coach.
    To one of the best of our data, all content is accurate as of the
    date posted, though offers contained herein could no longer be obtainable.
    The opinions expressed are the author’s alone and haven’t been offered, approved or in any other case endorsed by our advertisers.
    Data supplied on Forbes Health is for academic functions only.

    BCAAs differ from different amino acids because they’ve a branched construction and
    are the only amino acids damaged down in skeletal muscle.

    They’re thought-about essential since you must devour them through your food
    regimen. If you awakened and instantly started your exercise
    without any food, then it’s definitely a good idea to
    have protein after your workout as it helps to stop protein (muscle)
    breakdown and kickstart muscle recovery. Endurance
    athletes and those targeted on cardiovascular coaching want a
    pre-workout that enhances stamina without overstimulation. Clear
    Labs’ Stim-Free option supports oxygen uptake and circulation, guaranteeing that you could push by way
    of lengthy runs or high-intensity interval training periods.

    Kaged utilizes fermented L-Citrulline, an ingredient identified for
    its superior absorption and effectiveness
    in boosting nitric oxide levels. This permits for higher nutrient delivery to the muscular
    tissues, leading to improved endurance and recovery.
    Yes, creatine is superb for enhancing your exercises, but it’s additionally
    helpful for accelerated muscle restore. The norm is for pre-workout dietary supplements
    to comprise a complete lot of caffeine, sometimes
    starting from one hundred fifty mg to 350 mg in a serving.

    Kaged has offered us with the highest high quality, patented
    creatine HCl out there (unlike the generic Creatine HCl used by most brands).
    This is why it is recommended as probably the greatest creatine HCL supplements and probably the greatest bulking creatine dietary supplements.

    Again, it’s not going to harm you, and it might assist, especially should you fall
    beneath one of the distinctive cases above. Whereas BCAAs were promoted by sports activities researchers prior to now,
    new studies have proven that EAAs are a better option between the two.
    While there may be some profit to BCAAs, the latest analysis seems
    to recommend that if you will go the amino acid route,
    your finest guess is to snag some EAAS. So, in brief,
    creatine one hundred pc works and it’s one of many few supplements we
    feel confident sufficient to advocate for virtually all of lifters to
    purchase it. And there isn’t any want to worry about what
    occurs whenever you stop taking creatine, as it’s very
    doubtless that if you continue training your onerous, your
    features will remain. Clients have different views
    on the taste of the nutritional complement.
    They find it effective, cheap, and a good selection with clear elements.
    Prospects respect the nutritional complement’s lack of jitters and crash.
    They find it offers mental focus and vitality without any noticeable tingling or jitters.
    General, prospects are satisfied with the smoothness and lack of jitteriness.

    Knowledge from a limited number of research has been pretty contradictory about when you need to be taking creatine and BCAA dietary supplements.
    Creatine effectively promotes both short and long-term muscle development for individuals,
    regardless of how much they exercise. It will increase muscle fiber growth by two or three
    degrees of magnitude (5).
    It gives them a lot of power all through a exercise
    and would not have a crash. They even still have the energy to raise weights almost instantly after taking it.
    The product is nice for giving them a pick-me-up during
    every day exercises.
    This permits for increased exercise volume—a crucial think about long-term muscle gains.
    Short-term weight acquire (the commonest facet effect) from water retention sometimes begins within 24 to seventy
    two hours of beginning creatine supplementation and stabilizes after 5
    to seven days. This represents a constructive physiological response as water drawn into muscle cells create
    an anabolic setting. Improved cognitive function usually
    emerges after 4 to six weeks of supplementation, with studies exhibiting enhanced short-term reminiscence, intelligence, and reasoning skills.
    These brain perform enhancements outcome from increased phosphocreatine
    shops, which give extra energy for mentally demanding duties.

    Whereas it’s not common, there is a potential for dehydration, primarily if supplements are consumed in high quantities with out adequate
    water consumption. Creatine, specifically, could cause water
    retention in the muscular tissues, necessitating elevated water
    consumption to help in hydration and kidney perform. Increasing your
    water consumption when taking these supplements,
    especially during intense exercise or hot climates, is
    essential to preventing dehydration. Chugging down a pre-workout and instantly hitting the gym might sound logical.
    Still, you may not get the total benefits with out giving your physique time to soak up and activate
    the elements. Equally, understanding when to take BCAAs (before, during,
    or after a workout) and Creatine (consistently, even on non-workout days) is paramount to leveraging
    their benefits. Still, many choose to avoid synthetic sweeteners in on a daily basis products to help limit later sugar cravings.

    Creatine monohydrate stays the most dependable, cost-effective possibility for anybody looking for
    to reinforce their coaching capacity and muscle development.

    BCAA also helps repair muscle fibers and tissue and ease fatigue after a workout, as we
    stated in our review of WOWMD BCAA Shock, for faster restoration. Should you consume more BCAA
    or think about supplementing to boost your bodily performance and health?
    In this article, we evaluate their sources, properties,
    and benefits intimately that will help you decide.

    Customer Critiques, including Product Star Ratings help customers to study
    extra in regards to the product and decide whether or not it’s
    the right product for them. Most pre-workouts underdeliver, utilizing flashy advertising however leaving out key components or shortchanging doses.
    Ever felt that burning sensation in your muscles as you grind out your last reps?

    As talked about above, many of these power drinks will incorporate a whole listing
    of components, together with BCAAs or EAAs. Truthfully speaking, an excellent portion of those added ingredients are put in there to extend the pricing to make
    it seem it has a superior product while giving no profit apart from a potential placebo impact.
    All this considered, new analysis has proven that BCAAs don’t actually present advantages and have been taken off the “efficient dietary supplements” by ISSN, the International Society of Sports Activities
    Nutrition. Properly, it’s not impossible, however
    it would take a extremely long time and be of little profit as pre-workouts all
    have the same intent; improve your workout.
    Rip Toned Fitness is dedicated to serving to you
    overcome concern, accomplish routine, and conquer your fitness goals as you step into a
    healthy “way of living” that is efficient, confirmed and sustainable.

    BCAAs can help with muscle restoration and restore, which is important for general muscle progress and
    upkeep. Creatine can even assist with muscle recovery by
    replenishing muscle energy stores. Pre-workout may provide additional nutrients and hydration support on relaxation days.

    Utilizing the brick wall for example, muscle protein synthesis
    is adding bricks to the wall, whereas muscle protein catabolism
    is removing them. Whereas mixing creatine, BCAAs, and glutamine can offer a powerful combination for muscle development and restoration, the world of supplementation is huge and varied.
    For example, each creatine and BCAAs help muscle protein synthesis.

    Think About whether or not the combined benefits are
    definitely price the potential redundancy. In the world of sports nutrition and supplementation, the apply of blending numerous dietary supplements has turn into increasingly well-liked.

    Athletes, bodybuilders, and health fanatics typically seek ways to
    maximise the benefits of their dietary routine.
    Nevertheless, reserve pre-workout dietary supplements for train days to avoid unnecessary stimulant consumption.
    For optimum results, take creatine persistently every day, both before or
    after exercises. Take pre-workout dietary supplements minutes before
    exercise to allow for absorption and effectiveness.
    This combination can enhance workout performance by boosting vitality, power, and endurance.
    Before starting any new complement, especially
    if combining pre-workout and creatine, search advice from an expert to tailor the routine to
    your particular needs and fitness objectives.
    Are you in search of a stimulant-free pre-workout on the inexpensive side?
    The value on this pre-workout is above average but not too accessive.

    There are no financial savings for purchasing in bulk, however you
    can get a subscription that saves you 10%.
    Some report no tingling or change in body,
    whereas others expertise jitters, skin crawling, and bowel actions
    inside quarter-hour. Studies recommend that BCAAs could additionally be beneficial for certain populations, similar to athletes and folks with
    some liver conditions, like cirrhosis. Observe that safe for sport merchandise embrace those
    which are NSF Certified for Sport or Informed Sport certified.

    One physiological capabilities attributed to betaine is that it acts as an osmo-protectant,
    which implies it could possibly assist defend cells towards dehydration by acting as an osmolyte and growing the
    water retention of cells. Different studies
    suggest that betaine supplementation can lower plasma homocysteine concentrations and scale back
    irritation. In addition, betaine additionally
    acts as a methyl donor that may synthesize creatine in skeletal muscle.

    Analysis exhibits that betaine supplementation appears to cut back lactate
    accumulation in the blood and helps preserve mobile hydration in cells.

    Analysis additionally suggests that enhanced muscle oxygen consumption occurs when supplementing with betaine.

    A BCAA supplement will options three of the nine important amino acids, together with l-leucine, l-isoleucine and l-valine.

    Logically, it makes sense that the 2 supplements would feed off each other; creatine enhances work capacity, while the BCAAs provide the substrate wanted to enhance growth and repair.
    It’s the best pre-workout for any sport nutrition regimen that includes
    creatine. Pre Lab Pro works in tandem with creatine, helping to
    spice up athletic efficiency and supreme gains by way of separate — but complementary — pathways.

    Extra ATP means extra reps, more weight, and more muscle progress
    over time. Restoration is essential for train and, without allowing your muscles to repair adequately between workouts, there could be unfavorable
    penalties such as muscle tears that may hamper your process (6).

    Decreased restoration occasions from creatine dietary
    supplements also help you to push your self additional and extra incessantly.
    Before you start taking BCAAs and creatine collectively to complement your fitness regime, you need to pay attention to what you’re putting in your physique, what these dietary supplements
    do, and the means to enhance your performance levels.
    They are backed up by certifications like NSF and Informed Sport, which mean that their products undergo third-party testing for high quality and purity.
    My number one suggestion, Clear Labs Mass Gainer, has been the preferred protein and creatine product
    requested by clients in my store. After I began writing this text, it was nonetheless available on Bodybuilding.com, nevertheless it was only out there in the strawberry flavor.

    Between then and now, the product has fully sold out
    on bodybuilding.com with no indication of if or when will
    probably be coming back. If your priority is
    high quality food sources, a higher protein share per serving, or having
    a product that is third get together tested, then select Transparent Labs Mass Gainer instead.

    Cellucor Whey Sport is just obtainable in an 18 serving dimension,
    and solely is obtainable in chocolate or vanilla. Because of
    the small bottles, the worth per serving is higher than other protein powders available on the market (this
    is as a end result of cost often comes down when you ought to buy in bulk).

    NutraBio packs a scientific dose of components for these critical about their fitness, providing enhanced muscle synthesis
    and recovery. Cracked Pre-workout includes important
    nutritional vitamins however won’t meet the expectations for those seeking
    a powerful performance enhancer. ProSupps Mr.
    Hyde is well-liked for its taste and cost-effectiveness, although its synthetic content material could not go well with everyone.
    Throughout a take a look at session, Pre Jym noticeably ramped up
    my focus and energy in an intense circuit coaching workout.

    The product is made with natural caffeine that you could modify primarily based on your needs.
    It contains a moderate 55mg per serving, which allows for individual adjustments.
    They discover it supplies a lift of vitality with out jitters or tingling.

    This abdomen sensitivity issue is why I truly have 3
    grams of glutamine in Submit JYM. This dose helps cut back these
    issues yet still provides an sufficient dose to get the job accomplished.
    When we’re talking bout BCAAs, leucine is actually
    the star of the bunch since it’s the ignitor of muscle protein synthesis.
    However, doing so decreases concentrations of the
    opposite two amino acids, which then limits muscle protein synthesis.
    Subsequent to protein powders and pre-workouts,
    BCAAs — or branched chain amino acids — are among the most popular types
    of dietary supplements among gym lovers.

    References:

    what is the best testosterone steroid

  6. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  7. A formidable share, I simply given this onto a colleague who was doing a bit evaluation on this. And he in truth bought me breakfast as a result of I discovered it for him.. smile. So let me reword that: Thnx for the deal with! But yeah Thnkx for spending the time to debate this, I really feel strongly about it and love reading extra on this topic. If possible, as you develop into expertise, would you thoughts updating your weblog with extra particulars? It’s extremely helpful for me. Large thumb up for this weblog submit!

  8. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  9. Adding a testosterone ester to the cycle at a maintenance dose will also be significantly beneficial.
    100mg weekly of Testosterone Propionate will cover your wants on this space.

    Mg/week is an efficient and manageable dose for many males (unless
    pimples is a big drawback for you).
    Trenbolone acetate has been utilized in a few of the most extreme
    instances conceivable, together with as a half of human Biathlon doping scandals.
    In both classes this form of trenbolone has the acetate ester added to it.
    Trenbolone may increase protein synthesis within the physique, which
    may aid in muscle progress and restoration after strenuous exercise.
    Recent research means that trenbolone could improve protein synthesis by growing the activity of an enzyme known as mTOR.

    Trenbolone has been proven to activate mTOR activity
    in a wide range of ways, including growing phosphorylation. Phosphorylation is the
    process of attaching chemical compounds to different proteins or DNA strands so
    as to assist stabilize and regulate their exercise.
    Trenbolone is designed exclusively for use in animals, and studies on its effects in people are limited.
    Despite this, it is widely known as some of the extreme and harmful anabolic steroids
    due to its neurotoxic, cardiotoxic, hepatotoxic, and nephrotoxic properties.
    In the next submit, we’ll explore its numerous unwanted
    aspect effects and potential strategies for managing them.
    Trenbolone acetate is a synthetic anabolic steroid of the nandrolone group.
    Despite being illegal for human use in plenty of
    countries, trenbolone is utilized by some people for increasing muscularity,
    power and fat loss. Part of its attraction is resistance
    to aromatisation, which means it doesn’t convert to
    estrogen in the physique.
    The excellent news is that these two opposed results do not affect all Trenbolone consumers.
    Nevertheless, it is fairly risky with a high likelihood of an antagonistic reaction occuring.
    Trenbolone is thought for its intense unwanted side effects, which may include insomnia, night sweats,
    high blood pressure, and temper swings. These unwanted effects may be extremely uncomfortable, impacting
    day by day actions and high quality of life. Customers need
    to be ready for the bodily and mental strain that Tren can cause, as its potency makes it difficult to handle.

    Particularly, acne, accelerated hair loss, and those predisposed to male sample
    baldness body hair development and virilization symptoms in women. The concurrent
    use of a 5 alpha reductase inhibitor may have very little impact because the 5 alpha reductase enzyme does not metabolize the
    trenbolone hormone. William Levelin explains this totally through
    his research in anabolics showing how the imbalance between progesterone and estrogen is what leads to gynecomastia, not prolactin.
    So, we will anticipate the unwanted facet effects to be considerably magnified
    in comparability with what you’d experience even at high doses of testosterone.
    Trenbolone is taken into account a progestin, and this causes it to deliver some undesirable side effects
    associated to progesterone. This combination offers
    us a few of those exact same unwanted side effects which would possibly be well-known as estrogenic unwanted effects when utilizing different steroids.
    With any Trenbolone steroid, it’s not out
    of the question to achieve up to 20 pounds in a cycle, and this shall be high quality lean mass.
    Your likelihood of reaching that level goes to be increased
    if you stack it with different highly effective bulking
    steroids like Dianabol. While Dianabol is an oral steroid and
    Tren is injectable, each will cause great stress to the liver.

    Dianabol is a potent bulking cycle kickstarter that will shortly add a ton of dimension and massive strength features.

    While trenbolone acetate is usually protected and well-tolerated, there are
    a number of potential unwanted facet effects that ought to be thought-about earlier
    than using it. These unwanted side effects include increased urge for food, oily pores and skin, acne,
    hair loss, and breast enlargement. As with all
    anabolic steroids, long-term use can also lead to liver toxicity and gynecomastia (breast
    development).
    This is a steroid that will suppress your natural testosterone production fairly significantly.
    For this cause, you should include a testosterone steroid
    in your cycle to avoid falling into a low testosterone state.
    Solely a low dose of testosterone is required to fill this position during your Masteron cycle, as you aren’t utilizing that steroid for any purpose aside from as a testosterone replacement.
    With Trenbolone’s dry lean gains, this stack takes
    lean bulking to a whole new level and can promote fat loss concurrently.

    Nonetheless, it remains well-liked with bodybuilders and physique
    athletes for its physique-enhancing properties. It is good for pre-contest preparation in a slicing cycle the place you already have very low physique fat and need to trim down much more
    with a much harder, dryer look. At a minimum,
    testosterone should all the time be used in a Masteron cycle to retain your testosterone performance whereas Masteron suppresses and even shuts
    down pure testosterone manufacturing. In a chopping cycle, customers will profit enormously from stacking Masteron with different powerful chopping
    compounds like Anavar or Winstrol, additionally derived from DHT.

    This enhance in testosterone can lead to increases in muscle mass,
    energy, and aggression. Trenbolone acetate is a potent anabolic steroid that has been unlawful to buy in the
    United States since 1985. Regardless Of its illegality, trenbolone acetate
    continues to be illicitly manufactured and sold online. Well Being issues have been raised about the unwanted facet effects
    and health risks of trenbolone acetate use, including increased coronary heart fee, hypertension, stroke, liver toxicity, and most cancers.

    Trenbolone is a popular anabolic steroid used by bodybuilders to build
    muscle and burn fats.

    References:

    steroid detransformation

  10. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

Leave a Reply

Your email address will not be published. Required fields are marked *