Giter VIP home page Giter VIP logo

gonit's People

Contributors

aruiz14 avatar beltran-rubo avatar bitnami-bot avatar carrodher avatar fmulero avatar gongomgra avatar juamedgod avatar marcosbc avatar vutny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gonit's Issues

gonit fails to start nginx

gonit.log:

time="2019-06-30T23:59:39-07:00" level=info msg="Performing process check php-fpm"
time="2019-06-30T23:59:39-07:00" level=info msg="Performing process check mysql"
time="2019-06-30T23:59:39-07:00" level=info msg="Performing process check nginx"
time="2019-07-01T00:01:39-07:00" level=info msg="Performing checks"
time="2019-07-01T00:01:39-07:00" level=info msg="Performing process check php-fpm"
time="2019-07-01T00:01:39-07:00" level=info msg="Performing process check mysql"
time="2019-07-01T00:01:39-07:00" level=info msg="Performing process check nginx"
time="2019-07-01T00:01:39-07:00" level=info msg="Service nginx is not running. Starting..."
time="2019-07-01T00:03:09-07:00" level=warning msg="Timed out waiting for nginx to start (4 tries left)"
time="2019-07-01T00:03:39-07:00" level=info msg="Performing checks"
time="2019-07-01T00:03:39-07:00" level=info msg="Performing process check php-fpm"
time="2019-07-01T00:03:39-07:00" level=info msg="Performing process check mysql"
time="2019-07-01T00:03:39-07:00" level=info msg="Performing process check nginx"
time="2019-07-01T00:03:39-07:00" level=info msg="Service nginx is not running. Starting..."
time="2019-07-01T00:05:09-07:00" level=warning msg="Timed out waiting for nginx to start (3 tries left)"
time="2019-07-01T00:05:39-07:00" level=info msg="Performing checks"
time="2019-07-01T00:05:39-07:00" level=info msg="Performing process check php-fpm"
time="2019-07-01T00:05:39-07:00" level=info msg="Performing process check mysql"
time="2019-07-01T00:05:39-07:00" level=info msg="Performing process check nginx"
time="2019-07-01T00:05:39-07:00" level=info msg="Service nginx is not running. Starting..."
time="2019-07-01T00:07:09-07:00" level=warning msg="Timed out waiting for nginx to start (2 tries left)"
time="2019-07-01T00:07:39-07:00" level=info msg="Performing checks"
time="2019-07-01T00:07:39-07:00" level=info msg="Performing process check php-fpm"
time="2019-07-01T00:07:39-07:00" level=info msg="Performing process check mysql"
time="2019-07-01T00:07:39-07:00" level=info msg="Performing process check nginx"
time="2019-07-01T00:07:39-07:00" level=info msg="Service nginx is not running. Starting..."
time="2019-07-01T00:09:09-07:00" level=warning msg="Timed out waiting for nginx to start (1 tries left)"
time="2019-07-01T00:09:39-07:00" level=info msg="Performing checks"
time="2019-07-01T00:09:39-07:00" level=info msg="Performing process check php-fpm"
time="2019-07-01T00:09:39-07:00" level=info msg="Performing process check mysql"
time="2019-07-01T00:09:39-07:00" level=info msg="Performing process check nginx"
time="2019-07-01T00:09:39-07:00" level=info msg="Service nginx is not running. Starting..."
time="2019-07-01T00:11:09-07:00" level=warning msg="Timed out waiting for nginx to start (0 tries left)"

/opt/bitnami/config/monit/conf.d/nginx.conf:

check process nginx
  with pidfile "/opt/bitnami/nginx/logs/nginx.pid"
  start program = "/opt/bitnami/nginx/scripts/ctl.sh start" with timeout 90 seconds
  stop program = "/opt/bitnami/nginx/scripts/ctl.sh stop" with timeout 90 seconds

I can test these start/stop and they work. I traced the code in checks.go until I got to line 488 where it says:

c.StartProgram.Exec()

Searching for Exec lead me to line 336 where it says:

c.logger.Debug(exec.Command("/bin/bash", "-c", c.Cmd).Run())

What is c.Cmd? Does it get substituted without embedded quotes? this could cause an issue with starting:

$ /opt/bitnami/nginx/scripts/ctl.sh start # this works
$ /bin/bash -c /opt/bitnami/nginx/scripts/ctl.sh start # this doesn't

Thanks

Cannot trigger memory checks

What steps will reproduce the bug?

We are trying to get a notification when the system is in "Out of Memory" state.

This is our system.conf configuration,

check system localhost
  if memory usage > 10% for 2 cycles then alert

oom checker:

/**
oom.c
allocate chunks of 10MB of memory indefinitely until you run out of memory
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define TEN_MB 10 * 1024 * 1024

int main(int argc, char **argv){

        int c = 0;
        int counter1=0;
        while (1){
                char *b = malloc(TEN_MB);
                memset(b, TEN_MB, 0);
                printf("Allocated %d MB\n", (++c * 10));
                counter1++;

                if (counter1 %1000 == 0){
                        sleep (5);
                }
        }
        return 0;
}

/etc/gonit/gonitrc

set httpd port 2812 and
    use address localhost
    allow localhost

set daemon 30  #120            # check services at 2-minute intervals
set log /var/log/gonit.log

include /etc/gonit/conf.d/*.conf

What is the expected behavior?

Expecting alert on logs

What do you see instead?

executed this command tail -f /var/log/gonit.log /var/log/messages

time="2023-02-22T09:39:08+08:00" level=info msg="Performing checks"
time="2023-02-22T09:39:08+08:00" level=info msg="Performing check%!(EXTRA string=localhost)"
time="2023-02-22T09:41:08+08:00" level=info msg="Performing checks"
time="2023-02-22T09:41:08+08:00" level=info msg="Performing check%!(EXTRA string=localhost)"
time="2023-02-22T09:43:08+08:00" level=info msg="Performing checks"
time="2023-02-22T09:43:08+08:00" level=info msg="Performing check%!(EXTRA string=localhost)"

Additional information

Gonit 0.2.8
Built on: 2023-01-25 05:10:10 UTC
Git Commit: 66756d0

Static and minimal binary bin?

The binary release isn't static and fails with a custom minimal alpine linux?

        /lib64/ld-linux-x86-64.so.2 (0x7f86d4f11000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f86d4f11000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f86d4f11000)

And binary size is big with 8,5MB? Is it possible to build a shrinked and static binary?

Gonit Arm64/aarch64 Graviton support

What is the problem this feature will solve?

[root@ip-172-17-** gonit]# nano Makefile
[root@ip-172-17--** gonit]# make build/aarch64
+ Building GOARCH=aarch64
go: unsupported GOOS/GOARCH pair linux/aarch64
make: *** [Makefile:45: build/aarch64] Error 2
[root@ip-172-17--** gonit]# nano Makefile
[root@ip-172-17--** gonit]# make build
+ Building GOARCH=aarch64
go: unsupported GOOS/GOARCH pair linux/aarch64
make: *** [Makefile:45: build/aarch64] Error 2
[root@ip-172-17-** gonit]# nano Makefile
[root@ip-172-17-** gonit]# make build
+ Building GOARCH=amd64
*** Gonit binary created under ./dist/gonit/ ***
[root@ip-172-17-** gonit]# nano Makefile
[root@ip-172-17-** gonit]# make build
+ Building GOARCH=arm64
*** Gonit binary created under ./dist/gonit/ ***
[root@ip-172-17-** gonit]# gonit
Control file '/etc/gonit/gonitrc' does not exists
[root@ip-172-17-** gonit]#

What is the feature you are proposing to solve the problem?

Gonit Arm64/aarch64 Graviton support

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.