Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. define service{
  2. use pruebaspre-service,srv-pnp
  3. host_name server1.es
  4. servicegroups pruebasdatasourcesoaspre-servicegroup,pruebaspre-servicegroup
  5. service_description Estado DataSource - cfio JUVEPoolDSPoolDS
  6. check_command check_ds_oas!cfio!JUVEPoolDSPoolDS!/opt/oracle/ias10g/10.1.2!1!0
  7. }
  8.  
  9.  
  10. define service{
  11. use pruebaspre-service,srv-pnp
  12. host_name server1.es
  13. servicegroups pruebasdatasourcesoaspre-servicegroup,pruebaspre-servicegroup
  14. service_description Estado DataSource - cfio REMEPoolDS
  15. check_command check_ds_oas!cfio!REMEPoolDS!/opt/oracle/ias10g/10.1.2!1!0
  16. }
  17.  
  18.  
  19. define service{
  20. use pruebaspre-service,srv-pnp
  21. host_name server2.es
  22. servicegroups pruebasdatasourcesoaspre-servicegroup,pruebaspre-servicegroup
  23. service_description Estado DataSource - cfio iris_usr_irisPoolDS
  24. check_command check_ds_oas!cfio!iris_usr_irisPoolDS!/opt/oracle/ias10g/10.1.3!1!0
  25. }
  26.  
  27.  
  28. define service{
  29. use pruebaspre-service,srv-pnp
  30. host_name server2.es
  31. servicegroups pruebasdatasourcesoaspre-servicegroup,pruebaspre-servicegroup
  32. service_description Estado DataSource - cfio REMEPoolDS
  33. check_command check_ds_oas!cfio!REMEPoolDS!/opt/oracle/ias10g/10.1.2!1!0
  34. }
  35.  
  36. define service{
  37. use pruebaspre-service,srv-pnp
  38. host_name server2.es
  39. servicegroups pruebasdatasourcesoaspre-servicegroup,pruebaspre-servicegroup
  40. service_description Estado DataSource - cfio redt2_usr_redt2PoolDS
  41. check_command check_ds_oas!cfio!redt2_usr_redt2PoolDS!/opt/oracle/ias10g/10.1.3!1!0
  42. }
  43.  
  44. define service {
  45.      use pre-service tests, srv-pnp
  46.      host_name server1.es
  47.      servicegroups testsdatasourcesoaspre-servicegroup, pre-servicegroup tests
  48.      service_description DataSource Status - cfio REMEPoolDS
  49.      check_command check_ds_oas! cfio! REMEPoolDS! /opt/oracle/ias10g/10.1.2! 1! 0
  50. }
  51.  
  52. V_NAGIOS_COMMAND=check_ds_oas!cfio!REMEPoolDS!/opt/oracle/ias10g/10.1.2!1!0
  53. if [ `grep ${V_NAGIOS_COMMAND} --count $V_FILE_NAGIOS` -ge 1 ] ; then
  54. while read LINEA_CONFIG
  55. do
  56. V_DIRECTIVA=`echo $LINEA_CONFIG| awk '{print $1} '`
  57. V_VALOR_DIRECTIVA=`echo $LINEA_CONFIG| awk '{print $2} '`
  58. if [ $V_DIRECTIVA = check_command ]&&[ $V_VALOR_DIRECTIVA = $V_NAGIOS_COMMAND ]; then
  59. V_COMANDO_ENCONTRADO=1
  60. elif [ $V_DIRECTIVA = host_name ]&& [ $V_COMANDO_ENCONTRADO = 1 ] ; then
  61. if [ $V_VALOR_DIRECTIVA = $V_MAQUINA ] ; then
  62. ((V_EXISTEN_DATOS++))
  63. return 1
  64. else
  65. V_COMANDO_ENCONTRADO=0
  66. fi
  67. fi
  68. done < <(tac $V_FILE_NAGIOS| grep -vE "^#|^$")
  69. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement