gatus icon indicating copy to clipboard operation
gatus copied to clipboard

Config endpoints limitations

Open kanton10062006 opened this issue 2 years ago • 2 comments

Describe the bug

Hello,

Recently I’ve tried to create more than 1500 test endpoints just to identify if gatus can handle such amount of monitors and faced with exec /gatus: argument list too long issue during pod initialisation. The config section contained more than 30k lines initially. I've managed to decrease the count of endpoints to 700 and lines of the config ~ 5600. After that gatus was able to initialise and run as usual. Is this the hard limit of the argument list and it is not possible to increase it?

The endpoint’s config looks similar to this one:

config:
  endpoints:
  - name: 1-google.com
    url: https://1-google.com
    group: cfp
    interval: 15m
    conditions:
    - '[STATUS] == 200'
    - '[RESPONSE_TIME] < 500'
    - '[CERTIFICATE_EXPIRATION] > 240h'
  - name: 2-google.com
    url: https://2-google.com
    group: cfp
    interval: 15m
    conditions:
    - '[STATUS] == 200'
    - '[RESPONSE_TIME] < 500'
    - '[CERTIFICATE_EXPIRATION] > 240h'

It seems like there is no ability to configure default conditions to be able to decrease the amount of config lines, am I right?

What do you see?

exec /gatus: argument list too long

What do you expect to see?

No response

List the steps that must be taken to reproduce this issue

  1. Start the application
  2. Create a test configuration with more than 1000 endpoints
  3. Gatus won’t be able to start successfully

Version

v5.5.1

Additional information

No response

kanton10062006 avatar Aug 29 '23 14:08 kanton10062006

Did you try to split your configuration in multiple files? Like, 2 files with 500 endpoints each?

heitorPB avatar Oct 03 '23 17:10 heitorPB

It seems like there is no ability to configure default conditions to be able to decrease the amount of config lines, am I right?

Not quite, but you can use YAML anchors to shorten it: https://github.com/TwiN/gatus#keeping-your-configuration-small

Is this the hard limit of the argument list and it is not possible to increase it?

I find that the UI becomes hard to navigate after 500+ endpoints, but the back end should have no difficulty handling thousands of endpoints, provided Gatus runs in an environment with sufficient memory.

Also worth noting, Kubernetes' etcd may not be happy with an object that has tens of thousands of lines.

TwiN avatar Oct 08 '23 02:10 TwiN