GithubHelp home page GithubHelp logo

ansible-role-deploy_exporter's People

Contributors

jainnikhil30 avatar jhutar avatar kdelee avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jainnikhil30

ansible-role-deploy_exporter's Issues

Add propper SELinux policy for exporters

On RHEL8, Redis, uWSGI and PostgreSQL exporters fail to start because SELinux blocks connection to the socket:

[jhutar@localhost ~]$ echo 'type=AVC msg=audit(1617785747.387:17516): avc:  denied  { connectto } for  pid=117397 comm="redis_exporter" path="/run/redis/redis.sock" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:redis_t:s0 tclass=unix_stream_socket permissive=1' | audit2why
type=AVC msg=audit(1617785747.387:17516): avc:  denied  { connectto } for  pid=117397 comm="redis_exporter" path="/run/redis/redis.sock" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:redis_t:s0 tclass=unix_stream_socket permissive=1

	Was caused by:
		Missing type enforcement (TE) allow rule.

		You can use audit2allow to generate a loadable module to allow this access.

[jhutar@localhost ~]$ echo 'type=AVC msg=audit(1617785747.387:17516): avc:  denied  { connectto } for  pid=117397 comm="redis_exporter" path="/run/redis/redis.sock" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:redis_t:s0 tclass=unix_stream_socket permissive=1' | audit2allow 


#============= init_t ==============
allow init_t redis_t:unix_stream_socket connectto;

We probably need special SELinux type for every exporter and extra policy module for it. This way we could secure these arbitrary binaries for internet.

This might help:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/using_selinux/writing-a-custom-selinux-policy_using-selinux

https://opensource.com/article/18/7/sysadmin-guide-selinux

Firewalld ports are not opened properly

The task for opening the firewall ports gets skipped because of the wrong when condition. The condition right now is:

  when: "ansible_facts.services['firewalld.service'] is defined and ansible_facts.services['firewalld.service'].state == 'active'"

ansible_facts.services['firewalld.service'].state == 'active' this part can be false, because ansible reports state as running.

[root@perf-scale-test1-vsi ~]# ansible localhost -m service_facts | grep -i firewalld.service -A 4
            "firewalld.service": {
                "name": "firewalld.service",
                "source": "systemd",
                "state": "running",
                "status": "enabled"

Please add licensing information

This repository is lacking licensing information. As such, everything included in this repo is "All rights reserved".
Please note that in order to re-license this project you'll legally need ack from all existing contributors.

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.