Pandora FMS community forums
Does this program even work? - Printable Version

+- Pandora FMS community forums (https://pandorafms.org/forum)
+-- Forum: Pandora FMS (https://pandorafms.org/forum/forum-3.html)
+--- Forum: Help for new users in Pandora FMS (https://pandorafms.org/forum/forum-10.html)
+--- Thread: Does this program even work? (/thread-12999.html)



Does this program even work? - mike_moyse - 03-09-2019

Following on from my issue with the DNS monitor not working (Still broken, still not working), I've now tried from an example in the Linux Monitoring Docs to create a monitor for the SSHD process. It doesn't work.


module_begin
module_name Process sshd
module_type generic_proc
module_service sshd
module_description Process sshd running
module_end

It seems anything other than the built in default monitors don't work?
What am I doing wrong?


RE: Does this program even work? - eduardo.corral - 03-11-2019

(03-09-2019, 10:13 PM)mike_moyse Wrote: Following on from my issue with the DNS monitor not working (Still broken, still not working), I've now tried from an example in the Linux Monitoring Docs to create a monitor for the SSHD process. It doesn't work.


module_begin
module_name Process sshd
module_type generic_proc
module_service sshd
module_description Process sshd running
module_end

It seems anything other than the built in default monitors don't work?
What am I doing wrong?

Good morning mike_moyse,

Your problem is due to the fact that "module_service" is only valid for Windows Software agents.
The correct configuration for Linux is: module_exec service sshd status | grep "active"

Please, are change the module configuration and comment us the result.

Regards, 

Eduardo


RE: Does this program even work? - mike_moyse - 03-11-2019

(03-11-2019, 10:06 AM)eduardo.corral Wrote:
(03-09-2019, 10:13 PM)mike_moyse Wrote: Following on from my issue with the DNS monitor not working (Still broken, still not working), I've now tried from an example in the Linux Monitoring Docs to create a monitor for the SSHD process. It doesn't work.


module_begin
module_name Process sshd
module_type generic_proc
module_service sshd
module_description Process sshd running
module_end

It seems anything other than the built in default monitors don't work?
What am I doing wrong?

Good morning mike_moyse,

Your problem is due to the fact that "module_service" is only valid for Windows Software agents.
The correct configuration for Linux is: module_exec service sshd status | grep "active"

Please, are change the module configuration and comment us the result.

Regards, 

Eduardo

Yup, the problem is that your Linux Monitoring documentation is incorrect.

Please change your dcoumentation

https://pandorafms.com/library/linux-monitoring-manual/


RE: Does this program even work? - eduardo.corral - 03-11-2019

(03-11-2019, 11:27 AM)mike_moyse Wrote:
(03-11-2019, 10:06 AM)eduardo.corral Wrote:
(03-09-2019, 10:13 PM)mike_moyse Wrote: Following on from my issue with the DNS monitor not working (Still broken, still not working), I've now tried from an example in the Linux Monitoring Docs to create a monitor for the SSHD process. It doesn't work.


module_begin
module_name Process sshd
module_type generic_proc
module_service sshd
module_description Process sshd running
module_end

It seems anything other than the built in default monitors don't work?
What am I doing wrong?

Good morning mike_moyse,

Your problem is due to the fact that "module_service" is only valid for Windows Software agents.
The correct configuration for Linux is: module_exec service sshd status | grep "active"

Please, are change the module configuration and comment us the result.

Regards, 

Eduardo

Yup, the problem is that your Linux Monitoring documentation is incorrect.

Please change your dcoumentation

https://pandorafms.com/library/linux-monitoring-manual/

Good afternoon, mike_moyse

I have to apologize because I explained myself wrong. You can execute that module in Linux, but when you specify your "module_service" you have to do it by writing the whole command (you can get it typing "ps aux" in your terminal). 

In my case the module would be as it follows: 

Code:
module_begin
module_name Process XX
module_type generic_proc
module_service sshd: [email protected]/0
module_description Process XX running
module_end

Please let us know if this works for you and sorry for any inconvenience caused. 

Kind regards, 

Eduardo.


RE: Does this program even work? - mike_moyse - 03-11-2019

(03-11-2019, 01:46 PM)eduardo.corral Wrote:
(03-11-2019, 11:27 AM)mike_moyse Wrote:
(03-11-2019, 10:06 AM)eduardo.corral Wrote:
(03-09-2019, 10:13 PM)mike_moyse Wrote: Following on from my issue with the DNS monitor not working (Still broken, still not working), I've now tried from an example in the Linux Monitoring Docs to create a monitor for the SSHD process. It doesn't work.


module_begin
module_name Process sshd
module_type generic_proc
module_service sshd
module_description Process sshd running
module_end

It seems anything other than the built in default monitors don't work?
What am I doing wrong?

Good morning mike_moyse,

Your problem is due to the fact that "module_service" is only valid for Windows Software agents.
The correct configuration for Linux is: module_exec service sshd status | grep "active"

Please, are change the module configuration and comment us the result.

Regards, 

Eduardo

Yup, the problem is that your Linux Monitoring documentation is incorrect.

Please change your dcoumentation

https://pandorafms.com/library/linux-monitoring-manual/

Good afternoon, mike_moyse

I have to apologize because I explained myself wrong. You can execute that module in Linux, but when you specify your "module_service" you have to do it by writing the whole command (you can get it typing "ps aux" in your terminal). 

In my case the module would be as it follows: 

Code:
module_begin
module_name Process XX
module_type generic_proc
module_service sshd: [email protected]/0
module_description Process XX running
module_end

Please let us know if this works for you and sorry for any inconvenience caused. 

Kind regards, 

Eduardo.

That did the trick. Seems that your documentation needs to be updated to read:

4. Process Running

Checks if an specific process is being executed in the machine. For it, we should created one module in this way:
module_begin
module_name Process <Insert the name of the process>
module_type generic_proc
module_service xxx
module_description Process <Insert the name of the process> running
module_end

Replacing xxx by the specific process that we want to monitor, this can be found by running the command ps aux in a console.

e.g.

ps aux | grep named
bind     10647  0.0  1.3 175444 27904 ?        Ssl  16:39   0:00 /usr/sbin/named -f -u bind

You would then put this in your configuration:

module_service /usr/sbin/named -f -u bind


RE: Does this program even work? - eduardo.corral - 03-12-2019

(03-11-2019, 04:39 PM)mike_moyse Wrote:
(03-11-2019, 01:46 PM)eduardo.corral Wrote:
(03-11-2019, 11:27 AM)mike_moyse Wrote:
(03-11-2019, 10:06 AM)eduardo.corral Wrote:
(03-09-2019, 10:13 PM)mike_moyse Wrote: Following on from my issue with the DNS monitor not working (Still broken, still not working), I've now tried from an example in the Linux Monitoring Docs to create a monitor for the SSHD process. It doesn't work.


module_begin
module_name Process sshd
module_type generic_proc
module_service sshd
module_description Process sshd running
module_end

It seems anything other than the built in default monitors don't work?
What am I doing wrong?

Good morning mike_moyse,

Your problem is due to the fact that "module_service" is only valid for Windows Software agents.
The correct configuration for Linux is: module_exec service sshd status | grep "active"

Please, are change the module configuration and comment us the result.

Regards, 

Eduardo

Yup, the problem is that your Linux Monitoring documentation is incorrect.

Please change your dcoumentation

https://pandorafms.com/library/linux-monitoring-manual/

Good afternoon, mike_moyse

I have to apologize because I explained myself wrong. You can execute that module in Linux, but when you specify your "module_service" you have to do it by writing the whole command (you can get it typing "ps aux" in your terminal). 

In my case the module would be as it follows: 

Code:
module_begin
module_name Process XX
module_type generic_proc
module_service sshd: [email protected]/0
module_description Process XX running
module_end

Please let us know if this works for you and sorry for any inconvenience caused. 

Kind regards, 

Eduardo.

That did the trick. Seems that your documentation needs to be updated to read:

4. Process Running

Checks if an specific process is being executed in the machine. For it, we should created one module in this way:
module_begin
module_name Process <Insert the name of the process>
module_type generic_proc
module_service xxx
module_description Process <Insert the name of the process> running
module_end

Replacing xxx by the specific process that we want to monitor, this can be found by running the command ps aux in a console.

e.g.

ps aux | grep named
bind     10647  0.0  1.3 175444 27904 ?        Ssl  16:39   0:00 /usr/sbin/named -f -u bind

You would then put this in your configuration:

module_service /usr/sbin/named -f -u bind

Greetings, mike_moyse

We will look into it, thank you for your suggestions to keep improving Pandora FMS. 

Best regards, 

Eduardo.