Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        @register.filter
def nagios_safe(value):
    out = unicode(value)
    out = out.replace(u"\t", " ")
    out = out.replace(u"", "a").replace(u"", "e").replace(u"", "i").replace(u"", "o").replace(u"", "u")
    out = out.replace(u"", "A").replace(u"", "E").replace(u"", "I").replace(u"", "O").replace(u"", "U")
    out = re.sub(r'[^A-Za-z0-9: ]', r'?', out)
    out = out.replace(u"?", "")
    out = out.replace(u"  ", " ")
    return out[:63].strip()
        


src/a/r/arritranco-HEAD/arritranco/monitoring/nagios/views.py   arritranco(Download)
from models import NagiosCheck, NagiosCheckOpts, NagiosNetworkParent, HUMAN_TO_NAGIOS
from scheduler.models import TaskStatus, TaskCheck
from templatetags.nagios_filters import nagios_safe
 
def hosts(request):
            nsca.add_custom_status(
                    bt.machine.fqdn,
                    nagios_safe(bt.description),
                    HUMAN_TO_NAGIOS[status.status],
                    status.comment

src/a/r/arritranco-HEAD/arritranco/monitoring/nagios/models.py   arritranco(Download)
from network.models import Network
from monitoring.models import Responsible
from templatetags.nagios_filters import nagios_safe
 
NAGIOS_OK = 0
        nsca = NSCA()
        status_code = HUMAN_TO_NAGIOS[status.status]
        nsca.add_custom_status(task.backuptask.machine.fqdn, nagios_safe(task.description), status_code, status.comment)
        nsca.send()