Code Monkey home page Code Monkey logo

conext-bot's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

doxah

conext-bot's Issues

Identification Agent GLPI côté serveur

Modifier le fichier agent.cfg de glpi-agent afin de pouvoir communiquer avec un serveur protégé par Apache AUTH_BASIC

Demande des identifiants lors de l'init -> SED -i du fichier main.conf -> après Install GLPi Sed -i du fichier /etc/GLPI-Agent/agent.cfg via les valeurs de main.conf

Fichier Log générique

Compiler les informations essentielles des différents fichiers logs afin d'avoir une vue générale pour chaque Ordinateur.

Par exemple:
Inventaire -> OK / NOK
Effacement -> OK / NOK
SMART Short -> OK / NOK
SMART Long -> OK / NOK
RAM Test -> OK / NOK

Detecter type de stockage (HDD/SSD)

Actuellement, impossible de savoir dans GLPI quel est le type de stockage.

Il serait possible de reprendre une partie du script "toolbox.sh" de la clé de réemploi du collectif emmabuntus:

        # Identification du type de disque dur : Classique ou SSD
        TYPE_HARD_DRIVE=$(cat /sys/block/${HARD_DRIVE}/queue/rotational)
        if [ ${TYPE_HARD_DRIVE} -eq 0 ] ; then

            # Test si le SSD est NVMe
            HARD_DRIVE_NVME=$(sudo nvme list | grep "/dev/" | cut -d " " -f1 )

            if [ "${HARD_DRIVE_NVME}" != "" ] ; then

                NAME_TYPE_HARD_DRIVE="MVMe"
                ERASE_LOG=${NVME_LOG}

            else

                NAME_TYPE_HARD_DRIVE="SSD"
                ERASE_LOG=${HDPARM_LOG}

            fi

        else
            # Disque magnétique
            NAME_TYPE_HARD_DRIVE=${message_type_disque_dur}
            ERASE_LOG=${NWIPE_LOG}
        fi

        echo ""
        echo -e "${message_usb_disque_dur_avant} ${GREEN}${KEY_DRIVE}${NC} ${message_usb_disque_dur_apres}${GREEN}/dev/${HARD_DRIVE}${NC} (Type : ${GREEN}${NAME_TYPE_HARD_DRIVE}${NC})${NC}"
        echo ""

Adapter pour intégrer les informations dans le fichier inventory.xml afin d'avoir une remontée dans GLPI.

Test RAM

Faire un test ramener avec lot via memtester

Automatisation de l'effacement Nwipe

Trouver une méthode appropriée afin d’exclure formellement la clé USB contenant le Système Live actuellement démarrer, puis lancer un effacement "Quick" sur le reste des disques.

Sécurisation de l'inventaire

Il faudrait compléter le couple utilisateur/mot de passe du serveur Apache avec la gestion de certificats, afin de sécuriser la remontée des inventaires vers le serveur.

user

_Specifies the user to use for HTTP authentication on the server._

password

_Specifies the password to use for HTTP authentication on the server._

ca-cert-dir

_Specifies the directory containing indexed Certification Authority (CA) certificates.

This directory must contain the certificate files corresponding to different certificate authorities in Privacy Enhanced Mail (PEM) format. The file name of each certificate file must match the hash value of the certificate's subject field and use the .0 extension.

You can obtain the hash value of the certificate's subject field and copy the CA.crt certificate to the expected place following this snippet:

$ CA_CERT_DIR=/etc/glpi-agent/ca-cert-dir
$ openssl x509 -in CA.crt -subject_hash -noout
b760f1ce
* cp -a CA.crt $CA_CERT_DIR/b760f1ce.0_

ca-cert-file

_Specifies the file containing aggregated Certification Authority (CA) certificates._

ssl-cert-file

_Specifies the file containing SSL client certificate to use when connecting to server target or for WinRM remote inventory._

ssl-fingerprint (Available since GLPI Agent v1.3)

_Specifies the fingerprint of the ssl server certificate to trust.

The fingerprint to use can be retrieved in agent log by temporarily enabling no-ssl-check option._

Injection du nom sans modifier la variable Hostname

La variable Hostname étant une variable système, il serait préférable de paramétrer le nom à remonter dans GLPI via l'option additionnal-content.

additional-content

_Specifies an XML file whose content will be automatically merged with output. If inventory format is JSON, you can also specify a JSON file from which content base node will be merged.

This directive is used for inventory task only._

Création d'un fichier de configuration

Déplacer les chemins de destination et les options de test/effacement dans un fichier .conf

install.sh

chemin du répertoire log
adresse du serveur d'hébergement du script

script.sh

chemin du répertoire log
chemin du répertoir NFS
options nwipe
options et chemin log memtester

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.