Benutzer-Werkzeuge

Webseiten-Werkzeuge


wiki:monitoring

Dies ist eine alte Version des Dokuments!


Graphite

http://emmanuel.iffly.free.fr/doku.php?id=linux:graphite_opensuse

Mit pip3 Pakete suchen über einen Proxy

sudo -s pip3 search gmp --proxy https://ronni:geheim@webproxy.example.de:8002
sudo -s pip3 search gmp --proxy https://ronni:geheim@webproxy.example.de:8000

Mit pip3 Pakete installieren über einen Proxy

sudo -s pip3 install python-gvm --upgrade --proxy https://ronni:geheim@webproxy.example.de:8000

Python Pakete mit Pip nachinstallieren

Zunächst muss der Proxy für pip überwunden werden:

FIXME With Ubuntu I could not get the proxy option to work as advertised – so following command did not work:

sudo pip --proxy http://web-proxy.mydomain.com install somepackage

But exporting the https_proxy environment variable (note its https_proxy not http_proxy) did the trick:

export https_proxy=http://web-proxy.mydomain.com

oder wenn ein spezieller Port verwendet wird:

export https_proxy=http://webproxy.intra.rodgau.de:8080

anschließend pip nutzen:

sudo -E pip install somepackage

oder falls eine Authentifizierung benötigt wird:

pip --proxy user:geheim@webproxy.intra.rodgau.de:8080 search graphite-web

same here, –proxy did not work, I had to specify BOTH http_proxy AND https_proxy (Debian behind a corp firewall)

pip install carbon --proxy http://user:geheim@192.168.1.2:8080

Update pip

-U, --upgrade
              Upgrade  all  packages to the newest available version.  This process is recursive regardless
              of whether a dependency is already satisfied.
pip --upgrade --proxy http://user:geheim@192.168.1.2:8080

Package Check

check                 Verify installed packages have compatible dependencies.

für OpenVAS check

ronni@doom2018:~/git_src/Icinga_Plugin_Sammlung> ./check_gmp.py 
Traceback (most recent call last):
  File "./check_gmp.py", line 37, in <module>
    from gmp.gvm_connection import (SSHConnection,
ImportError: No module named 'gmp'
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# GMP Nagios Command Plugin
#
# Description: A nagios command plugin for the Greenbone Management Protocol
 
 
import argparse
import logging
import os
import sys
import sqlite3
import tempfile
import signal
 
from argparse import RawTextHelpFormatter
from datetime import datetime
from lxml import etree
from gmp.gvm_connection import (SSHConnection,
                                TLSConnection,
                                UnixSocketConnection)
(21:02:20) Mario: da steht ja, wie das geht oder?
pip install python-gvm
(21:02:33) Mario: dann wird das wohl ins System installiert
(21:02:41) Mario: wahrsch. site-packages oder sowas
(21:02:44) ronnih@mail.de/thor: gmp heißt doch das Modul?
(21:02:57) Mario: https://github.com/greenbone/python-gvm
(21:02:58) ronnih@mail.de/thor: und wenn das installiert ist findet der den Pfad
(21:03:07) ronnih@mail.de/thor: das habe ich auch grad offen
(21:03:11) Mario: from gvm.protocols.latest import Gmp
(21:03:18) Mario: das macht das gmp verfügbar
(21:04:02) ronnih@mail.de/thor: ok, dann installiere ich dieses gvm zuerst
(21:04:49) Mario: scheint mir alles normal zu sein. Immerhin haben dies über pip verfügbar gemacht
(21:05:00) Mario: kein manueller Download oder sowas
(21:05:26) ronnih@mail.de/thor: Und das was die da bei Example schreiben macht das Programm automatisch oder muss man da noch was machen mit dem from gvm.protocols.latest import Gmp?
(21:05:35) Mario: das site-packages gehört zum PYTHONPATH, d.h. der findet das dann dort
(21:05:45) Mario: das siehst du dann also nicht an der Stelle des Scripts
(21:06:41) Mario: ich hab k.A. was das Ding tut
(21:06:48) Mario: das ist ein rudimentäres Beispiel
(21:06:51) Mario: mit foo und bar
(21:06:56) Mario: irgendein Login wo hin
(21:08:03) Mario: irgendwelche Services mit XML...
(21:08:14) Mario: anscheinend testet dieses Framework sowas
(21:08:30) ronnih@mail.de/thor: Oki werde ich morgen nochmal versuchen das zu installieren, ist oftmals nicht so einfach durch den Proxy zu kommen wenn der alles blockt. Pip ist eine Katastrophe wenn man über Proxy raus will
(21:09:01) Mario: wir ham sowas auch, aber viell. einfacher
(21:09:10) Mario: da gibts dann Umgebungsvariablen
(21:09:16) Mario: http_proxy und sowas
(21:09:23) Mario: ftp_proxy, https_proxy
(21:09:36) Mario: da steht dann ein ofsquid:8080 oder so drin
(21:09:43) Mario: wenn man das gesetzt hat, darf man raus
wiki/monitoring.1551174475.txt.gz · Zuletzt geändert: 2019/02/26 10:47 von techguru