NRDP send custom alert from console windows application

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
k2ibegining
Posts: 4
Joined: Fri May 11, 2018 2:45 am

NRDP send custom alert from console windows application

Post by k2ibegining »

Hi,

I am trying to figure out how to send custom alerts, via passive services with nagios XI. I create a passive service check on nagios XI UI, as explained https://assets.nagios.com/downloads/nrd ... tUQAvD_BwE and here https://assets.nagios.com/downloads/nag ... ios-XI.pdf and here https://support.nagios.com/kb/article/n ... t-599.html.

On Nagios XI UI I see though that status as not applied for Service description (Disk usage). I ran the python script given in the above mentioned link from the windows powershell (the machine that runs the console app). Is this use case possible ? Can I lets say have somehow report custom alert from my console app with a custom service name ? Right now the example on the link mentions services such as Disk usage, memory usage, up time etc. Are these standard services running on the client machine to be passively checked ?

Please help as i am unable to understand what piece i am missing here. My use case is as I mentioned that i want to have the ability to send some alerts to nagios XI from my windows based console app (c# based). My understanding is that I can port somehow either of the scripts written in python or php and use it for my purpose ?

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP send custom alert from console windows application

Post by scottwilkerson »

Yes you can use whatever service name you would like.

The names in the article are examples.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NRDP send custom alert from console windows application

Post by cdienger »

The "not applied" message simply means that config changes have been made but not applied to the running config. Apply them by clicking the "Apply Configuration" button under Quick Tools > Apply Configuration or on the Host or Services pages.

You can create custom plugins that would run on the client and and in turn call send_nrdp to send the results to the Nagios system. Send_nrdp is simply the method of transferring data and kb just shows example data being sent. The check disk example could be sent if you had a plugin that checked disk space for instance.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
k2ibegining
Posts: 4
Joined: Fri May 11, 2018 2:45 am

Re: NRDP send custom alert from console windows application

Post by k2ibegining »

I am attachign the screenshots here. As you can see when i select the passive service and apply the configuration then still it shows up as not applied.

I am just wondering if i need to do something on the client machine too for this to be successful ? .. The config name is the IP of my client machine from which i will send some kind of notification.

just to clarify a bit further, for the time being i am trying to send some test data using nrdp python script from windows powershell. I was hoping that i will get this test data/alert on to my nagios XI UI showed somehow. If this is success, then somehow i can use my application to either call this python or php script or port it to my application.

please let me know if my understanding is correct ?
You do not have the required permissions to view the files attached to this post.
k2ibegining
Posts: 4
Joined: Fri May 11, 2018 2:45 am

Re: NRDP send custom alert from console windows application

Post by k2ibegining »

ok so i had to disable the firewall somehow on my windows machine, and the nagios xi could actually change the pending state to OK, as the windows client became reachable.

Now siicne i ran the python script on my windows client machine as follows

py send_nrdp.py -u http://<IP_nagiosXI>/nrdp/ -t auCxxxxxxRoj -H "localhost.localdomain" --service="Passive" --state=1 --output="Error: session could not be started "

As a result of this run, should I not be able to see some notification on my nagios XI against this Passive service name ?

However, i can not see anything there yet ! Just wondering if i am on the right page here !


Thanks
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NRDP send custom alert from console windows application

Post by cdienger »

What are the stalking and volatile options set to(https://assets.nagios.com/downloads/nag ... ios-XI.pdf) ? The would need to be set appropriately to get alerts. You can also run 'tail -f /usr/local/nagios/var/nagios.log' as you run the script to verify it's getting to nagios.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
k2ibegining
Posts: 4
Joined: Fri May 11, 2018 2:45 am

Re: NRDP send custom alert from console windows application

Post by k2ibegining »

I could not get it run though, but using web basead http URL mechanism I could finish the task !

Thanks for your help !
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NRDP send custom alert from console windows application

Post by cdienger »

Glad to hear it worked out : )
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked