Boa tarde,
Maik, valeu pelo pontapé incial!Fiz um teste e não deu o resultado esperado... :-(
O Nagios executou a saída do "echo" e "printou" na tela!
Em terça-feira, 31 de outubro de 2017 21:38:02 BRST, Maik Alberto address@hidden [shell-script] <address@hidden> escreveu:
#!/bin/bash
echo -e "Content-type: text/html\n\n"
echo "<a href=''>CGI em Shell Script</a>"
De: address@hidden <address@hidden> em nome de Kleber Melo address@hidden [shell-script] <address@hidden>
Enviado: terça-feira, 31 de outubro de 2017 20:00
Para: Yahoo! Brazil
Assunto: [shell-script] Como usar tag HTML no script para exibição na saída do NagiosXI?
Saudações a todos,
Preciso adicionar um link para uma documentação interna dentro dos scripts em shell, a fim de que o Nagios XI possa exibí-lo na tela de alertas. A ideia é facilitar para o time de operação encontrar o procedimento correto para cada tio de alerta.
Nunca coloquei código HTML em shell e o que encontrei na internet falam sobre CGI, ou seja, executar script a partir de uma página/formulário.
Alguém poderia me dar uma ideia de como fazer isso?
Valeu!
Abraços
Kleber Melo
#yiv3140008436 #yiv3140008436 -- #yiv3140008436ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv3140008436 #yiv3140008436ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv3140008436 #yiv3140008436ygrp-mkp #yiv3140008436hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}#yiv3140008436 #yiv3140008436ygrp-mkp #yiv3140008436ads {margin-bottom:10px;}#yiv3140008436 #yiv3140008436ygrp-mkp .yiv3140008436ad {padding:0 0;}#yiv3140008436 #yiv3140008436ygrp-mkp .yiv3140008436ad p {margin:0;}#yiv3140008436 #yiv3140008436ygrp-mkp .yiv3140008436ad
a {color:#0000ff;text-decoration:none;}#yiv3140008436 #yiv3140008436ygrp-sponsor #yiv3140008436ygrp-lc {font-family:Arial;}#yiv3140008436 #yiv3140008436ygrp-sponsor #yiv3140008436ygrp-lc #yiv3140008436hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv3140008436
#yiv3140008436ygrp-sponsor #yiv3140008436ygrp-lc .yiv3140008436ad {margin-bottom:10px;padding:0 0;}#yiv3140008436 #yiv3140008436actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv3140008436 #yiv3140008436activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv3140008436
#yiv3140008436activity span {font-weight:700;}#yiv3140008436 #yiv3140008436activity span:first-child {text-transform:uppercase;}#yiv3140008436 #yiv3140008436activity span a {color:#5085b6;text-decoration:none;}#yiv3140008436 #yiv3140008436activity span span
{color:#ff7900;}#yiv3140008436 #yiv3140008436activity span .yiv3140008436underline {text-decoration:underline;}#yiv3140008436 .yiv3140008436attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv3140008436 .yiv3140008436attach
div a {text-decoration:none;}#yiv3140008436 .yiv3140008436attach img {border:none;padding-right:5px;}#yiv3140008436 .yiv3140008436attach label {display:block;margin-bottom:5px;}#yiv3140008436 .yiv3140008436attach label a {text-decoration:none;}#yiv3140008436
blockquote {margin:0 0 0 4px;}#yiv3140008436 .yiv3140008436bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv3140008436 .yiv3140008436bold a {text-decoration:none;}#yiv3140008436 dd.yiv3140008436last p a {font-family:Verdana;font-weight:700;}#yiv3140008436
dd.yiv3140008436last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv3140008436 dd.yiv3140008436last p span.yiv3140008436yshortcuts {margin-right:0;}#yiv3140008436 div.yiv3140008436attach-table div div a {text-decoration:none;}#yiv3140008436
div.yiv3140008436attach-table {width:400px;}#yiv3140008436 div.yiv3140008436file-title a, #yiv3140008436 div.yiv3140008436file-title a:active, #yiv3140008436 div.yiv3140008436file-title a:hover, #yiv3140008436 div.yiv3140008436file-title a:visited {text-decoration:none;}#yiv3140008436
div.yiv3140008436photo-title a, #yiv3140008436 div.yiv3140008436photo-title a:active, #yiv3140008436 div.yiv3140008436photo-title a:hover, #yiv3140008436 div.yiv3140008436photo-title a:visited {text-decoration:none;}#yiv3140008436 div#yiv3140008436ygrp-mlmsg
#yiv3140008436ygrp-msg p a span.yiv3140008436yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv3140008436 .yiv3140008436green {color:#628c2a;}#yiv3140008436 .yiv3140008436MsoNormal {margin:0 0 0 0;}#yiv3140008436 o {font-size:0;}#yiv3140008436
#yiv3140008436photos div {float:left;width:72px;}#yiv3140008436 #yiv3140008436photos div div {border:1px solid #666666;min-height:62px;overflow:hidden;width:62px;}#yiv3140008436 #yiv3140008436photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv3140008436
#yiv3140008436reco-category {font-size:77%;}#yiv3140008436 #yiv3140008436reco-desc {font-size:77%;}#yiv3140008436 .yiv3140008436replbq {margin:4px;}#yiv3140008436 #yiv3140008436ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv3140008436
#yiv3140008436ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv3140008436 #yiv3140008436ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv3140008436 #yiv3140008436ygrp-mlmsg select, #yiv3140008436 input, #yiv3140008436 textarea
{font:99% Arial, Helvetica, clean, sans-serif;}#yiv3140008436 #yiv3140008436ygrp-mlmsg pre, #yiv3140008436 code {font:115% monospace;}#yiv3140008436 #yiv3140008436ygrp-mlmsg * {line-height:1.22em;}#yiv3140008436 #yiv3140008436ygrp-mlmsg #yiv3140008436logo
{padding-bottom:10px;}#yiv3140008436 #yiv3140008436ygrp-msg p a {font-family:Verdana;}#yiv3140008436 #yiv3140008436ygrp-msg p#yiv3140008436attach-count span {color:#1E66AE;font-weight:700;}#yiv3140008436 #yiv3140008436ygrp-reco #yiv3140008436reco-head {color:#ff7900;font-weight:700;}#yiv3140008436
#yiv3140008436ygrp-reco {margin-bottom:20px;padding:0px;}#yiv3140008436 #yiv3140008436ygrp-sponsor #yiv3140008436ov li a {font-size:130%;text-decoration:none;}#yiv3140008436 #yiv3140008436ygrp-sponsor #yiv3140008436ov li {font-size:77%;list-style-type:square;padding:6px
0;}#yiv3140008436 #yiv3140008436ygrp-sponsor #yiv3140008436ov ul {margin:0;padding:0 0 0 8px;}#yiv3140008436 #yiv3140008436ygrp-text {font-family:Georgia;}#yiv3140008436 #yiv3140008436ygrp-text p {margin:0 0 1em 0;}#yiv3140008436 #yiv3140008436ygrp-text tt
{font-size:120%;}#yiv3140008436 #yiv3140008436ygrp-vital ul li:last-child {border-right:none !important;}#yiv3140008436
[As partes desta mensagem que não continham texto foram removidas]