Posted by vdelburgo on septiembre 5, 2007 at 14:07
Buenos días,
Mi consulta es la siguiente: tengo instalado el servidor Pandora en una máquina con Red Hat, y un agente en una máquina Windows. Hasta ahí todo bien pues hay comunicación y puedo hacer monitorizaciones de Procesos y Servicios… pero me gustaría monitorizar si se están ejecutando a su hora las Tareas Programadas que están en la máquina en la que está el agente… ¿hay alguna manera de poder ver esto?
el servicio Programador de Tareas crea un archivo de control llamado SchedLgU.txt en la carpeta %windir% (en XP, C:Windows en W2K, C:Winnt), donde se puede consultar el estado de las tareas y posibles errores.
Puedes añadir a tu agente windows de Pandora FMS un módulo que ejecute un comando/script (usando la directiva module_exec, tienes ejemplos en el propio fichero pandora_agent.conf).
Realizar lo que quieres sólo va a depender de tus habilidades con la línea de comando para «parsear» la información del fichero de control (usando las utilidades propias de Windows, las incluidas en el directorio Util del agente o alguna más externa).
He probado con lo que me has comentado y utilizo un Windows 2003, y el archivo SchedLgU.txt no existe por ningún lado…. La tarea que quiero monitorizar casualmente deja un archivo de Log, pero cuando intento parsearlo no me lo pilla… el procedimiento que utilizo es el siguiente:
Parece ser que no me reconoce el comando ‘type’ porque este módulo no me lo coge… y otra cosilla, ya que estamos puestos ¿hay algo para, al parsear, coja una columna, al estilo del ‘awk { print $2 }’?
He probado con lo que me has comentado y utilizo un Windows 2003, y el archivo SchedLgU.txt no existe por ningún lado…. La tarea que quiero monitorizar casualmente deja un archivo de Log, pero cuando intento parsearlo no me lo pilla… el procedimiento que utilizo es el siguiente:
Parece ser que no me reconoce el comando ‘type’ porque este módulo no me lo coge… y otra cosilla, ya que estamos puestos ¿hay algo para, al parsear, coja una columna, al estilo del ‘awk { print $2 }’?
Un saludo y gracias
-VÍCTOR-
Claro, tienes el gawk en el directorio /util de Pandora. Revisa que esos comandos estén en el path del sistema, puede ser ese el problema. Para esa llamada te recomiendo que pases del type y uses directamente el grep …
Si esto lo ejecuto desde el MS-DOS, el resultado que me devuelve es éste:
senderSMS, Tue Sep 11 11:15:00 CEST 2007
…pero como agente en sí no me funciona… ¿qué estaría mal?
Un saludo y gracias
-VÍCTOR-
Hombre, eso que te devuelte es una cadena de texto, generic_data es para tipos numéricos. No sé que dato quieres recoger y para qué, pero con esa cadena, puedes generar alertas de texto, pero primero tienes que recogerla como cadena (generic_data_string)
We use technologies like cookies to store and/or access device information. We do this to improve browsing experience and to show (non-) personalized ads. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Siempre activo
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Siempre activo
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.