Hi,

This would be better turned into a UNIX agent script, since the ability to manually force applications to exist was removed some time ago (which this script seemingly relied on!)

adam.

Sent from Mailbird

On 07/07/2015 16:01:35, Mathias Giroud <admin@giroudmathias.ch> wrote:

Hello,

Can you help me for this integration ?
https://gist.github.com/arekinath/3384869

Cordialement,



GIROUD Mathias

Tél.: +41 (0)27 519 00 46

Email: hello @giroudmathias.ch
Site: www.giroudmathias.ch

This e-mail (including any attached documents) is intended for the named recipient(s) only. If you are not the intended recipient, we kindly ask you not to review, retain, copy or distribute this message, and we ask you to notify the sender by reply e-mail immediately and delete this message from your system. Thank you.













Le 07.07.15 13:00, « observium au nom de observium-request@observium.org » a écrit :

>Send observium mailing list submissions to
> observium@observium.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
> http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
>or, via email, send a message with subject or body 'help' to
> observium-request@observium.org
>
>You can reach the person managing the list at
> observium-owner@observium.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of observium digest..."
>
>
>Today's Topics:
>
> 1. Re: mysql_fetch_array replacement? (Robert Williams)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Mon, 6 Jul 2015 11:50:29 +0000
>From: Robert Williams
>To: "observium@observium.org"
>Subject: Re: [Observium] mysql_fetch_array replacement?
>Message-ID:
>Content-Type: text/plain; charset="utf-8"
>
>Thanks guys, didn?t realise it was a php function ?
>
>Interestingly there were no errors at all, just a zero output from the function, which didn?t help!
>
>Anyway, the solution was indeed from the example given on here:
>
>foreach(dbFetchRows("SELECT hostname FROM `devices` WHERE `disabled`=0 ORDER BY hostname") as $data)
>
>(Then the rest of the original code)
>
>So cheers for that!
>
>
>Robert Williams
>Custodian Data Centre
>Email: Robert@CustodianDC.com
>http://www.CustodianDC.com
>From: observium [mailto:observium-bounces@observium.org] On Behalf Of Adam Armstrong
>Sent: 05 July 2015 18:54
>To: observium@observium.org
>Subject: Re: [Observium] mysql_fetch_array replacement?
>
>I expect he's now using mysqli_* via the config option, which means mysql_* is no longer connected to a database :)
>
>adam.
>
>Sent from Mailbird
>
>On 05/07/2015 18:43:14, Phillip Baker wrote:
>In fact, I?d be surprised if mysql_query is working if you?ve switched Observium to mysqli. What?s the actual error output of the script when you run it?
>
>Phil
>
>From: observium [mailto:observium-bounces@observium.org] On Behalf Of Robert Williams
>Sent: 05 July 2015 13:51
>To: Observium Network Observation System (observium@observium.org)
>Subject: [Observium] mysql_fetch_array replacement?
>
>Hi,
>
>After the SVN up on the 18th July the script we use for generating the Smokeping targets stopped producing any data (the list of slightly reformatted hostnames). The script itself was taken from this mailing list about 2 years ago and is as follows:
>
>#!/usr/bin/env php
><>
>
>include("/opt/observium/includes/defaults.inc.php");
>include("/opt/observium/config.php");
>include("/opt/observium/includes/definitions.inc.php");
>include("/opt/observium/includes/functions.php");
>
>echo "*** Targets ***\n\nprobe = FPing\n\nmenu = Top\ntitle = Network Latency Grapher\nremark = Welcome to SmokePing\n\n";
>
>$query = mysql_query("SELECT hostname FROM `devices` WHERE `disabled`=0 ORDER BY hostname");
>
>while ($data = mysql_fetch_array($query)) {
> $hostid = str_replace(".","_",$data['hostname']);
> $hostname = $data['hostname'];
> echo "+ $hostid\n\nhost = $hostname\n\n";
>}
>
>?>
>
>I can see that /includes/functions.php no longer exists but it?s replacement in functions.inc.php does not appear to have a function for mysql_fetch_array().
>
>So my question is, can someone point me to the correct replacement function for this? I?ve had a look through it and can?t see what I?m looking for, but PHP is not my ?thing? so I?m missing it.
>
>Any assistance appreciated!
>
>Robert Williams
>Custodian Data Centre
>Email: Robert@CustodianDC.com
>http://www.CustodianDC.com
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL:
>
>------------------------------
>
>Subject: Digest Footer
>
>_______________________________________________
>observium mailing list
>observium@observium.org
>http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
>
>
>------------------------------
>
>End of observium Digest, Vol 60, Issue 37
>*****************************************
>


_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium